Disallow missing commas between fields (#2287 #2520)#2889
Open
alisa101rs wants to merge 6 commits intoKotlin:devfrom
Open
Disallow missing commas between fields (#2287 #2520)#2889alisa101rs wants to merge 6 commits intoKotlin:devfrom
alisa101rs wants to merge 6 commits intoKotlin:devfrom
Conversation
Author
|
Hi @sandwwraith, could you please take a look at failed build? I believe it's not caused by this PR and I shouldn't/can't fix it in this PR |
Member
|
Sure, I'll restart the build |
sandwwraith
requested changes
Dec 23, 2024
Member
sandwwraith
left a comment
There was a problem hiding this comment.
Hi! Thanks for the great PR! I love the idea overall, but I have several comments on implementation.
formats/json-tests/commonTest/src/kotlinx/serialization/json/MissingCommaTest.kt
Outdated
Show resolved
Hide resolved
formats/json-tests/commonTest/src/kotlinx/serialization/json/MissingCommaTest.kt
Show resolved
Hide resolved
formats/json/commonMain/src/kotlinx/serialization/json/internal/StreamingJsonDecoder.kt
Outdated
Show resolved
Hide resolved
alisa101rs
commented
Dec 24, 2024
formats/json/commonMain/src/kotlinx/serialization/json/internal/lexer/AbstractJsonLexer.kt
Outdated
Show resolved
Hide resolved
Member
|
Just a quick update from me: I've reviewed the PR and I'm mostly satisfied with the changes. However, I also ran the decoding benchmarks and unfortunately, scores for them dropped for about 6-8%: I will try to investigate whether it is possible to restructure some changes to optimize it further or if we have to accept this performance hit for the sake of correctness. |
Author
|
Yeah I think performance hit comes from this change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2287 and #2520, makes sure that comma between key-value pairs is required in
Json.decodeFromString