+ Start a Discussion
Raghu kattulaRaghu kattula 

How can i print the json data to salesforce object data

public class Json_Parser 
{

    Public String JsonString {set;get;}
    Public Map<String,Object> Result {set;get;}
    
    
    public Json_Parser()
    {
        Result = new Map<String,Object>(); 
        JsonString = '{"Name":"Raghu","age":[10,20,30,40],"Industry":"Energy","Rating":"Hot"}';
        System.JSONParser jp = JSON.createParser(JsonString);
        while(jp.nextToken()!=null)
        {
            Result.put(jp.getText(), jp.getCurrentToken());
            
        }
    }
    public static void Execute()
    {
        // System.debug('Values are '+ Result) ;
    }
    
}
VinayVinay (Salesforce Developers) 
Check below example reference.

https://salesforce.stackexchange.com/questions/158493/field-mapping-from-json-response-to-custom-object

Thanks,