Custom JSONEncoder & JSONDecoder
This MR adds custom JSONEncoder
and JSONDecoder
that handles non-standard JSON values used by the go client.
-
Handle BigInt
values in JSON at keyValue
by converting them to/fromString
. -
Add JSONEncodingError
andJSONDecodingError
for extra verbose output when debugging JSON coding-related issues.
The JSONEncoder
and JSONDecoder
are internal, to avoid name collisions when using the XXClient
library as a dependency, but internally all models are encoded/decoded using the custom encoder/decoder. Convenient encode
and decode
methods on each model remain public.
Edited by Dariusz Rybicki