We have following values:
|Id | Name |Language|
|1 | abc | |
When I query the above record and debug this record in apex class it shows:-
(Library__c:{Id=xxxxxxxxxxxx, Name=abc})
It is not showing language field Why?
Actually, I need to create JSON from the query result. As the query result not showing the null or empty values, therefore, Json is also not including the null and empty values.
Best Answer
you can do the following:
If you don't want all the non-query'd fields to be null values in your json you can adjust the list of Sobjectfield returned by the describe.
If it's just the language field you wan't to check you can do the following: