FUNCTION

gtv.toJSON

pure function toJSON(): json

Deprecated (for removal): Use 'to_json' instead

Convert this GTV to a JSON value.

Big integers are serialized as JSON numbers. Note that when deserializing back with gtv.from_json(), small big integers (within standard integer range) will become regular integers, and large big integers cannot be deserialized (will cause a runtime error).

Returns

a JSON value equivalent to this GTV

Since

0.9.0

Alias of gtv.to_json

© 2026 Chromia