Problem when dealing with empty arrays #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. 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 :)