-
Notifications
You must be signed in to change notification settings - Fork 66
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
[JOHNZON-277] Fails to deserialize inner empty JSON block {} at OBJECT_START #45
Conversation
Agree, our offsetting does not handle that |
@rmannibucau Thanks for your confirmation. :-) Filed JIRA https://issues.apache.org/jira/browse/JOHNZON-277. |
@rmannibucau Shall I switch PR from draft state to PR state, so you can merge the test before there is bug fix developed? |
seems enough, do you want to give it a try? |
@rmannibucau LOL, I actually developed exactly the same solution already :-D Works like a charm, just pushed the commit. |
Ah, seems my solution is slightly different. As I know for sure that the caller was at START_OBJECT before, I simply return a constant. |
@mkarg constant is better, just misses array case I guess |
The array case actually cannot happen. The |
Hmm,need to check if we cant set a deserializer in an array or collection |
@rmannibucau You are right. I checked the Javadocs and the same problem can occur with arrays. I will fix. |
Custom deserializer fails with inner empty JSON block {} / [] at START_OBJECT / START_ARRAY. Signed-off-by: Markus KARG <markus@headcrashing.eu>
@rmannibucau Fixed END_ARRAY case, too, and covered it with a unit test. Interesting side aspect: Discovered a different but related bug with empty arrays, so I actually had to ignore a piece of the test. Will look inside that other bug later and cover it with a second PR. Can you please meanwhile review and merge this one? That would be great because my team is stuck due to that original bug and waits for the Johnzon nightly build containing my fix. |
@rmannibucau Thanks for merging. I really appreciate your supportive and agile way to onboard new contributors! 👍 Next on my list is looking into that new bug I mentioned. |
@mkarg some people did it for me so it is the least I can do now, in particular when relevant ;). Thanks a lot for doing the PR in addition to investigate the issue, it is very appreciated. |
@rmannibucau Before filing another bug report I think it is better to show you this draft. It seems this time I really detected a bug. So we can discuss BEFORE posting this code to JIRA. :-)