-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonParser returns empty string #10
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
I'm working on a program which takes JSON (an exported Trello board), and formats it into a list (each card in a custom format). The beginning process starts by going to the next node in the new JsonParser until it finds the array's key "cards". This works perfectly fine and does eventually find the key.
Bug
The problem occurs during the collection process. At this point, I have the event set to OBJECT_START, and I've already checked if there is a next value. After this, I go into a do-while loop:
The first cycle works perfectly fine. But on the next cycle when the event is set to KEY_NAME and I call getString, the returned string is "", when it should have been "id".
Workaround
To resolve this in the mean time, I switched to a while loop (the reverse order, and I do not skip the array's start before the collection process):
This works, but it is undesirable (I already know that there is a next value at the beginning of the loop and should not have to check again).
The text was updated successfully, but these errors were encountered: