JSON standard - floating point numbers

ThePiachu picture ThePiachu · Oct 24, 2013 · Viewed 78.7k times · Source

I am wondering whether the following floating point notation is a valid JSON notation:

"result":{"base_fee":1e-005}

or should the exponent notation be replaced with a decimal notation?

Answer

Delan Azabani picture Delan Azabani · Oct 24, 2013

It is valid according to the format available at json.org as numbers can optionally have a base 10 exponent denoted by an E, uppercase or lowercase, an optional plus or minus, and one or more digits.

image of JSON number format