Skip to content

Custom JSONEncoder & JSONDecoder

Dariusz Rybicki requested to merge feature/json-coders into development

This MR adds custom JSONEncoder and JSONDecoder that handles non-standard JSON values used by the go client.

  • Handle BigInt values in JSON at key Value by converting them to/from String.
  • Add JSONEncodingError and JSONDecodingError 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

Merge request reports