Replies: 3 comments 15 replies
-
|
The reason the commas are aligned is because technically it's treating the array as a single-column table. You can get rid of that behavior by disabling table formatting by setting This is a common complaint. It is an eyesore to have all those commas hanging out like that when you've got a contain whose values are all strings. (It's presumably not an issue for numbers or booleans, and it doesn't try when the types are mixed.) I'd like to put in some way to deal with this case without completely disabling table formatting. I'm not sure what the best approach is. Maybe a new Whatever the fix is, I'd probably want it to be the new default, which would mean it should be a new major version, since some people might be counting on the current default behavior. |
Beta Was this translation helpful? Give feedback.
-
|
I've got a solution that seems to be working in most cases, but there's a question about what's correct for certain number cases. What do you guys think? All of the following examples assume the new setting (name not final) Three of the four number modes are simple - they work like you'd expect.
But things look weird, in my opinion, with I'm wondering if it would be appropriate to make an exception for this case. That way it would look like this: It's easier to read. If you're doing Here are the two Do you think one of those is clearly always the right choice? Or should the setting be more complicated than a simple boolean? |
Beta Was this translation helpful? Give feedback.
-
|
Implemented in version 4.1.0. The npm and Nuget packages are now available. I'll adjust the VSCode extension and web formatter soon. It's controlled by the setting I also created a new factory method, Thanks for your help, @josdejong and @vdhamer. I think you've helped guide FJ in a good direction. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
FracturedJson aligns the commas vertically with each other, like so:
{ "Beatles Songs": [ "Taxman" , "Hey Jude" , "Act Naturally" , "Ticket To Ride" ] }Is there a way to position the commas right after the values, like so:
{ "Beatles Songs": [ "Taxman", "Hey Jude", "Act Naturally", "Ticket To Ride" ] }If not, I would love to see this as a new option!
Beta Was this translation helpful? Give feedback.
All reactions