-
Notifications
You must be signed in to change notification settings - Fork 143
Consider supporting "compact-pretty-printed" mode #586
Copy link
Copy link
Open
Description
Would it be possible to support json_pretty_compact-style formatting? From that crate's example - note how it tries to fit as many elements on a single line as possible, and only when it can't fit more, it inserts a line break. This implies a back-tracking algorithm - for each sub-tree, render it as a one-liner until it no longer fits, otherwise backtrack and break into multiple lines
[
{
"name": { "first": "Kobe", "middle": "Nico", "last": "Grimes" },
"phoneNumber": "1-547-479-5471 x062",
"username": "Kobe-Grimes",
"emails": [ "Melyssa.Cremin4@gmail.com", "Jayne.Green37@gmail.com" ],
"coordinates": { "latitude": "-66.3821", "longitude": "127.117" }
},
{
"name": { "first": "Adrian", "middle": "Finley", "last": "Koch" },
"phoneNumber": "1-420-853-5251 x68083",
"username": "Adrian-Koch",
"emails": [ "Andy99@gmail.com", "Elenor.Aufderhar96@gmail.com" ],
"coordinates": { "latitude": "51.4003", "longitude": "3.351" }
}
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels