List of lists does not beautify correctly, adds additional values #12

Closed
kashiraja opened this Issue Sep 27, 2016 · 2 comments

Projects

None yet

2 participants

@kashiraja
kashiraja commented Sep 27, 2016 edited

This should be valid JSON, however:

{ "values": [ [ 1, 2, [ 3 ], 4 ] ] }

Becomes:
{ "values": [ [ 1, 2, [1, 2, 3], 4 ] ] }
Notice how the list within the list is expanded from list with 1 item to 3 items.

@martindrapeau
Owner

I confirm the bug. This happens when the "Inline short arrays" switch is on.

@martindrapeau martindrapeau added a commit that referenced this issue Sep 27, 2016
@martindrapeau github issue #12 16828dd
@martindrapeau
Owner

Fixed. I also added a depth option so you can specify when to stop inlining arrays. Here is your testcase fixed:
http://www.csvjson.com/json_beautifier/25620df899fc8321e98a9282ae168186

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