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.
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.