Skip to content

RFC compliance!

Compare
Choose a tag to compare
@StringEpsilon StringEpsilon released this 28 Apr 18:13
· 24 commits to master since this release

I decided to run the tests from https://github.com/nst/JSONTestSuite and had more than 60 tests fail on me.

I fixed all tests with the "y_" or "n_" prefix. This affects:

  • Number validation (again!). Some of those were extreme edgecases, like "0e+1" not passing.
  • How object closure is handled: Stuff like [1]] wasn't malformed
  • String validation. Unescaped control characters (bytes 1 to 31) are now treated as unexpected tokens when within quotes.
  • Dangling commas are now handled (i.e. [1,] and {"foo": 1,}
  • \u0000 will now be deescaped. Be careful with that.
  • Excess characters after the valid JSON will now be an error. IE. [18.1]#
  • While deescaping, missing surrogates will now reliably cause errors

If you relied on some of the above mentioned, check your JSON files.

Also: Defining fbJson_Debug will no longer exit the program when encountering an error.