v5.0.0
Features
Properties of expanded objects (ones that aren't inlined or table-formatted) are now aligned so that their values begin in the same column. This makes for a more consistent look between table-formatted and expanded objects. The new setting MaxPropNamePadding controls how much space FracturedJson is allowed to add, since it looks bad and wastes space if some property names are much longer than others. (Set to -1 to disable this feature. Use ColonBeforePropNamePadding to put colons next to the property names instead of in a line of their own.)
Example:
{
"ModuleId" : "armor",
"Name" : "",
"FreeformLocations": [
[11, 2], [11, 3], [11, 4], [11, 5], [11, 6], [11, 7], [11, 8], [11, 9],
[11, 10], [11, 11], [11, 12], [11, 13], [11, 14], [ 1, 14], [ 1, 13], [ 1, 12],
[ 1, 11], [ 1, 10], [ 1, 9], [ 1, 8], [ 1, 7], [ 1, 6], [ 1, 5], [ 1, 4],
[ 1, 3], [ 1, 2], [ 4, 2], [ 5, 2], [ 6, 2], [ 7, 2], [ 8, 2], [ 8, 3],
[ 7, 3], [ 6, 3], [ 5, 3], [ 4, 3], [ 0, 4], [ 0, 5], [ 0, 6], [ 0, 7],
[ 0, 8], [12, 8], [12, 7], [12, 6], [12, 5], [12, 4]
],
"Orientation" : "Fore",
"Seed" : 272691529
}
Settings changes
- New:
MaxPropNamePadding- limits expanded property alignment when property names differ greatly in length. (Doesn't apply to table formatting.) - New:
ColonBeforePropNamePadding- controls where property name padding goes relative to the colon. - Removed:
OmitTrailingWhitespace- Trailing whitespace is always removed now. - Removed:
MaxInlineLength- Stopped being useful onceMaxTotalLineLengthwas introduced a few versions ago. - Default changed:
MaxCompactArrayComplexity- now defaults to2instead of1. - Default changed:
NumberListAlignment- now defaults toDecimalinstead ofNormalize. There are many cases where changing numbers' representations can alter how software treats them.Decimalalways preserves exactly how numbers were written in their source documents, so it's a safer default. - Default changed:
TableCommaPlacement- now defaults toBeforePaddingExceptNumbersinstead ofAfterPadding. It looks nicer whenNumberListAlignment=Decimal.
Commandline App
Added the ability to read options from a config file. Use --config to name a specific file. Otherwise,
FracturedJsonCli looks for a default file named .fracturedjson.jsonc, .fracturedjson.json, or .fracturedjson,
walking up the directory hierarchy until one is found. It starts from the current directory if input is given
by STDIN, or the input file's directory if --file is used. Use --no-conifg if you don't want to use a default
file. Commandline switches override the file's values.
You can use Example-Config-File.jsonc as a template, if you want, and just uncomment the settings you care about.
Comments and trailing commas are allowed.