Problem when dealing with empty arrays #2
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I am facing problems when parsing empty arrays.
Here is a reduced example:
I would expect this code to print foo false false and not throw any exception.
Actually, the last readValue throws an exception instead of returning false.
If instead omitting the last readValue exitObject throws an exception.
After further testing, it also seems to omit the last array value, e.g. with the JSON string ´{"foo":[123, 456]}´ it reads 123 successfully, but returns false on the second readValue already.
Edit: It actually stores 456 in $v, but also returns false. I am not sure if that is intended or not.
Apart from that your parser works great and is nice to use :)