Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2012 05:45
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 anonymous/4248650 to your computer and use it in GitHub Desktop.
Save anonymous/4248650 to your computer and use it in GitHub Desktop.
apex json serializations
system.debug(json.serialize(null));
map<String,String> x = new map<string,String>();
x.put('foo', null);
system.debug(json.serialize(x));
21:44:16.180 (180192000)|USER_DEBUG|[1]|DEBUG|null
21:44:16.181 (181186000)|USER_DEBUG|[4]|DEBUG|{"foo":null}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment