public toJson(exclude as List<String> = null, spaces as Boolean = true, pretty as Boolean = false, indent as Int = 0) as String:
Returns the object as JSON text.
Compact output is produced by default. Pretty output uses an indented multi-line format delegated to JSON.stringify(...).
JSON representation of the object. klyn import klyn.math r = Rational(3, 4) print(r.toJson(pretty=true, indent=2))