Both serde-json and schemars assume u128 and i128 are serialized as a number. Since the JSON standard supports arbitrary length integers, this is actually valid. By serializing u128/i128 as strings we break ecosystem conventions which lead bugs down the road, especially since the JSON Schema and ts-codegen will generate a wrong type.
This change is clearly breaking, but a good candidate for a 1.0.0 release of this repo.
To illustrate the change, an example document looks like this:
Both serde-json and schemars assume u128 and i128 are serialized as a number. Since the JSON standard supports arbitrary length integers, this is actually valid. By serializing u128/i128 as strings we break ecosystem conventions which lead bugs down the road, especially since the JSON Schema and ts-codegen will generate a wrong type.
This change is clearly breaking, but a good candidate for a 1.0.0 release of this repo.
To illustrate the change, an example document looks like this: