Closed jongilm closed 4 years ago
@jongilm Thanks a lot for pointing out the issue, and I'm really glad it could help you. It will be really good if you can PR the change, but the weird thing is I don't know how to give the permission for PR, so if you can guide me, I will give you the permission.
I figured it out. On github the process is to:
I hope this helps
Merged #2
Problem:
The code can enter an infinite loop after parsing a complex string that requires recursion.
Cause:
After recursively parsing of a child object, the string pointer is not incremented correctly. It is increased by the current _offset, rather than only the size of the child/recursed object(s).
e.g.
After parsing {"first":"John", "last":"Doe"}, the string pointer is incorrectly advanced to the "2", instead of the ",".
Solution:
Increment the string pointer by the size of the recursed child objects, rather than the current (already incremented) _offset.
@forkachild: I don't have permission to push a branch or raise a pull request, so please feel free to apply the change yourself, assuming you like it. Also, great solution, thanks. It was exactly what I was looking for. I will indeed buy you that beer. Rgds Jonathan