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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@martindrapeau

martindrapeau Sep 27, 2016

Owner

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

Owner

martindrapeau commented Sep 27, 2016

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

martindrapeau added a commit that referenced this issue Sep 27, 2016

@martindrapeau

This comment has been minimized.

Show comment
Hide comment
@martindrapeau

martindrapeau Sep 27, 2016

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

Owner

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

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