feature to allow trailing commas (non-compliant JSON)
See original GitHub issueSplitting 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:
- Created 10 years ago
- Reactions:5
- Comments:11 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+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.
@albertocavalcante There is
JsonReadFeature.ALLOW_MISSING_VALUES
(and deprecatedJsonParser.Feature.ALLOW_MISSING_VALUES
) which might work.