question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feature to allow trailing commas (non-compliant JSON)

See original GitHub issue

Splitting off from #52 and originally at http://jira.codehaus.org/browse/JACKSON-618

Presumably a feature named: ALLOW_TRAILING_COMMA

If enabled the following would be valid and yield the same result:

  • [1,2,3,] [1,2,3]
  • {1:1,} {1:1}

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:5
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
UnquietCodecommented, Mar 14, 2014

+1

Even though this is getting a little far afield for acceptable representations, Jackson is pretty magical about handling other nonsense (like comments), and this would be handy.

0reactions
cowtowncodercommented, Aug 24, 2021

@albertocavalcante There is JsonReadFeature.ALLOW_MISSING_VALUES (and deprecated JsonParser.Feature.ALLOW_MISSING_VALUES) which might work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling non-compliant JSON with Jackson - cowtowncoder
As with most other features, there is currently no writer-side feature to skip null elements or to add trailing comma; although latter can ......
Read more >
Trailing commas - JavaScript - MDN Web Docs
JavaScript allows trailing commas wherever a comma-separated list of values is accepted and more values may be expected after the last item.
Read more >
JSON with Commas and Comments - Hacker News
As JSON is based on JavaScript's syntax prior to ES5, trailing commas are not allowed in JSON.
Read more >
JsonParser.Feature (Jackson-core 2.9.0 API) - FasterXML
Feature that determines whether JsonParser will allow for a single trailing comma following the final value (in an Array) or member (in an...
Read more >
Enum JsonParser.Feature - Adobe Developer
Feature that determines whether JsonParser will allow for a single trailing comma following the final value (in an Array) or member (in an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found