encode_json multimethod
Methods
- encode_json(obj:Any)
Encode JSON (serialize a data structure to JSON) Returns
StrExample
encode_json({"a": 1+1}) # The string { "a": 2 }
- encode_json(x:Any, hints:Hash={}) Source: stdlib.ngs:7964
Convert data structure into JSON compatible data using JsonData and call built-in encode_json(). Implement JsonData() for your own types to customize converting to JSON. Parameters
hints Hash, set 'pretty' to true to pretty-print the JSON Returns
Str