Created
October 2, 2019 10:01
-
-
Save olopsman/880ad3eb987cb7f1e35716173f50ebbc to your computer and use it in GitHub Desktop.
Apex JSON.deserialize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String input = '{"name":"paulo","age":42, "car" : {"model" : "outlander", "year" : "2016"}}'; | |
| Account a = (Account) JSON.deserialize(input, Account.class); | |
| system.assertEquals(a.name, 'paulo'); | |
| system.debug(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment