Quick answer

JSON numbers must be decimal.

JSON Invalid Number Format

JSON numbers must be decimal. No leading zeros (except 0.x), no NaN or Infinity, no hex or octal.

Common causes

How to fix

Examples

Bad

{"n": 07}

Good

{"n": 7}

FAQ

Can JSON have leading zeros in numbers?
No. 07 is invalid; use 7.
Can I use Infinity in JSON?
No. Use null or a string, or omit the value.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical