toJson(mapListOrLiteral,isCompact)¶
Definition¶
String toJson(Object mapListOrLiteral, Boolean isCompact)
Description¶
Takes a map, list, or literal and returns a string representation of the json that would represent that object.
For a more readable output, the json can be rendered with additional whitespace,or can be stored in condensed form.
Parameter Definition¶
Name | Type | Description |
---|---|---|
mapListOrLiteral | Object | A map, list, or literal |
isCompact | Boolean | "true" if the resulting json should contain minimal whitespace, "false" otherwise (for better readability). |