ipld / specs

Content-addressed, authenticated, immutable data structures
Other
592 stars 108 forks source link

DAG-JSON: be more specific about numbers #308

Closed vmx closed 3 years ago

vmx commented 3 years ago

The IPLD Data Model distinguishes between integers and floats, so should DAG-JSON. The easy way is to do what popular dynamically typed programming languages are doing. If the number only contains digits, it's an integer, if it contains a decimal point, it's a float.

This PR was triggered by my exploration report about numbers 1, where I realized that there are also underspecified things when parsing DAG-JSON as input.