Function: serialize()
GalaChain core SDK 1.0.0-rc.8 / index / serialize
Function: serialize()
serialize(
value):string
Defined in: packages/gala-core-sdk/dist/index.d.ts:1526
GalaChain's deterministic JSON: object keys sorted (UTF-16 code-unit order) at every depth, no
whitespace, undefined/function members dropped, toJSON() honored. Byte-identical to
serialize from @gala-chain/api / json-stringify-deterministic for every JSON-shaped
value, which is all a DTO ever is.
Parameters
value
unknown
Returns
string
Throws
TypeError for circular structures and BigInt values (as JSON.stringify does) and
when the value itself has no JSON representation (undefined, a function, a symbol).