Аргументы
any
обязательно
Value для encode и decode. Supported JSON values проходят round-trip через JSON; unsupported types кодируются как null, если encode options не требуют ошибку.
EncodeOptions
Optional encode options, передаваемые в encode step, такие как sortKeys, emptyTableAsArray, errorOnUnsupported, encodeInvalidNumbersAsNull, maxDepth, pretty и indent.
Возвраты
any
Decoded value, созданный из encoded JSON. Objects и arrays это new tables с JSON kind markers из decoder; JSON null values становятся json.null.