Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

JSON.parseMore

Based on Crockford's json_parse.js, this not eval based JSON parser adds support for the much needed NaN and infinities.

Test it online

Why ?

  • because when you deal with numbers in a scientific or technical applications, it's hard not to use IEEE754's NaN and sometimes painful not to use infinities
  • because some JSON builders let you write NaN (for example Google's gson)
  • because eval('('+json+')') fails on IE with big JSON strings

How to use it ?

Download the js file and import it :

<script src=json_parseMore.js></script>

and then parse any JSON string using

var parsed = JSON.parseMore(json);

License

Public Domain. Use as you wish and at your own risk.

About

A not eval based JSON parser handling NaN and infinities

Resources

Releases

No releases published
You can’t perform that action at this time.