Skip to content
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

Suggest adding Feature.ALLOW_TRAILING_COMMA to the lenient Jackson object mapper #740

Closed
david-bakin-sl opened this issue Jun 24, 2023 · 5 comments

Comments

@david-bakin-sl
Copy link

david-bakin-sl commented Jun 24, 2023

Allowing trailing commas would make it (slightly) easier to add/remove test cases from the end of the JSON specification of a JSON parameterized test.

At JacksonJsonConverter's constructor.

@beatngu13
Copy link
Member

Hi @david-bakin-sl,

thx for the suggestions – makes sense to me as our default mapper shall be "lenient". Other opinions?

Side note: JsonParser.Feature.ALLOW_TRAILING_COMMA is deprecated as of Jackson 2.10, we should use JsonReadFeature.ALLOW_TRAILING_COMMA instead.

@david-bakin-sl
Copy link
Author

Nothing else for me. The only other one I really like is allowing comments and that's already set.

@beatngu13
Copy link
Member

@david-bakin-sl feel free to create a PR. Otherwise, I will mark it as "up for grabs". ✌️

@Michael1993
Copy link
Member

Tentatively added to #741

Michael1993 added a commit that referenced this issue Sep 7, 2023
This PR solves the need to be able to customise the ObjectMapper
in JSON based tests, e.g.: load in services. It also adds the option
ALLOW_TRAILING_COMMA.

Closes: #704, #740
PR: #741
@Michael1993
Copy link
Member

Added in #741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants