+ Start a Discussion
AnonDevAnonDev 

Creating records via REST API which must contain 1 or more JSON object on SFDC org Object field

Good morning all, I am having some issues applying the following logic needed to my REST API controller: There are two custom objects in my org - Object A will be populated with several fields of which one of several can/will be a JSON object, with nested data upon creation of a record.
- Object B has fields which will be populated with values which are contained in the JSON object(s) just created in Object A.

The only constant reference point I have is the unique SFDC ID for my SOQL/SOSL queries. 

I am thinking a possible good approach is using LIKE statements with wildcards to identify the fields on Object A which are/will be JSON objects for the front end, I am just not sure how to go about that percisely just yet. 

Any input and advice would be much appreciated!
ShashankShashank (Salesforce Developers) 
Another way I could think of is to use string methods or pattern matching to determine whether the field value is ion json format.
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_pattern_and_matcher_using.htm