The type of the data to be converted to JSON.
The data to be converted to JSON.
Optional parameter that determines whether the resulting JSON string should be pretty-printed. Default is false
.
The JSON string representation of the given data.
toJson({ name: 'John', age: 30 }, true);;
//=> "{\n "name": "John",\n "age": 30\n}"
Generated using TypeDoc
Converts the given data to a JSON string.