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

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

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

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

kashiraja opened this issue Sep 27, 2016 · 2 comments

Comments

@kashiraja
Copy link

@kashiraja kashiraja commented Sep 27, 2016

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
Copy link
Collaborator

@martindrapeau martindrapeau commented Sep 27, 2016

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

Loading

martindrapeau added a commit that referenced this issue Sep 27, 2016
@martindrapeau
Copy link
Collaborator

@martindrapeau martindrapeau commented Sep 27, 2016

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

Loading

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

Successfully merging a pull request may close this issue.

None yet
2 participants