JsonReader 0.7.0
This release features an overhaul in lexing as well as other performance improvements. Things should be a bit faster.
Numbers will no longer be returned as strings from JsonReader::value(), they will instead be cast automatically to float or int as appropriate while minding the new option below.
Added
JsonReader::FLOATS_AS_STRINGSoption is now accepted by theJsonReaderconstructor. This will cause the reader to return floats as their original strings. This includes any JSON number with a decimal point or exponent, as well as those abovePHP_INT_MAXor belowPHP_INT_MIN.
Changed
- The JsonReader node constants are now strings. This makes debugging a bit easier. Note that this also changes the return type of
JsonReader::type()tostring. - The parser, lexer, and input streams are no longer
Traversable. Those using these directly will want to check their new simplified interfaces. - Tuples from the lexer have a new shape to them. Again if you're using this directly you'll want to check the new interface.