Latest Updates
Travel to Technology
System.JSON Exception: Apex Type unsupported in JSON: Object
The Salesforce JSON.deserialize(String, Type) method cannot deserialize from JSON into generic Object, or into objects with generic Object fields. You can deserialize into concrete types such as “String†or “Integerâ€.

If you have defined your field types as Object, e.g. public Object error, you need to replace Object with the appropriate data type, i.e. String, Integer, etc.

Once you have updated the JSON2Apex generated Apex class with proper data structure then you should fine with deseialize your JSON.
PS. when you use JSON2Apex to generate Apex class by default assign to object since JSON2Apex doesn’t guess what type should for null values.
Our Recent Blogs
-
27 Jan, 2021
Salesforce Architect Domain Exam
-
23 Nov, 2016
Salesforce Certified Technical Architect New Path
-
28 Mar, 2018
Salesforce Release Exam in Trailhead Certification
-
29 Dec, 2021
Salesforce Certifications