Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created January 21, 2023 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/07a7c847509bbd75b5f5513045ea58e2 to your computer and use it in GitHub Desktop.
Save arun12209/07a7c847509bbd75b5f5513045ea58e2 to your computer and use it in GitHub Desktop.
String jsonString = '{ "name": "John Doe", "age": 35, "address": { "street": "123 Main St", "city": "Anytown", "state": "CA", "zip": "12345" }, "phoneNumbers": [ { "type": "home", "number": "555-555-1234" }, { "type": "work", "number": "555-555-5678" } ] }';
Example json = (Example)JSON.deserialize(jsonString, Example.class);
System.debug(json);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment