json.ql
| Constructor | Description |
|---|---|
| JsonConverter(_gson, prettyPrint) |
| Function | Description |
|---|---|
| native static fun createJsonConverter(prettyPrint) | Creates a JsonConverter with the pretty print option. |
| native fun toJson(obj) | Converts an object to a JSON string. |
| native fun fromJson(str) | Converts a JSON string to an object. |
| Field | Description |
|---|---|
| java _gson | |
| boolean prettyPrint |
Creates a JsonConverter with the pretty print option.
prettyPrint
( boolean )
|
If the JSON should be pretty printed when deserialized |
The created JsonConverter
Converts an object to a JSON string.
obj
|
The object to convert to JSON, of any type |
The JSON string