stleary / JSON-java

A reference implementation of a JSON package in Java.
http://stleary.github.io/JSON-java/index.html
Other
4.49k stars 2.56k forks source link

All unit tests must pass in strict mode #891

Open stleary opened 2 months ago

stleary commented 2 months ago

The unit tests should yield the same result for default and strict mode parsing. Tests may fail for the following reasons:

The unit tests will be updated as a separate issue from #887 and #888. After merging the unit test fixes, the review of strict mode may continue.

rikkarth commented 1 month ago

All passing except for this one case that we're still debating. https://github.com/stleary/JSON-java/pull/888#issuecomment-2093444238

stleary commented 1 month ago

@rikkarth No worries, I will go ahead and accept this PR and merge it in 3 days. Will also hold off on merging #894 so that you don't have yet another commit to merge to. However, your code still has this line in JSONParserConfiguration: this.strictMode = true; image

This must be deleted or at least commented out. You can do it yourself if you have time, or I can edit the file in place. I also think that smallCharMemory and arrayLevel can still be optimized away, but that is a task for another day. Thanks for all of the work you put into #888!

rikkarth commented 1 month ago

I will clean it up for you. Thank you @stleary

If you have some tests that need optimization, review or implementation let me know I can help in doing some.

rikkarth commented 1 month ago

Merged.