V1.x Options - j-brooke/FracturedJson GitHub Wiki

Options (for version 1.x)

The following options control how the JSON data is formatted.

MaxInlineLength

Maximum length of a complex element on a single line, or of each line in a compact array. This includes only the data for the inlined element, not indentation or leading property names.

Example: MaxInlineLength=80

{
    "LongArray": [
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
        79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157,
        163, 167, 173, 179, 181, 191, 193, 197, 199
    ],
    "ComplexObject": {
        "Subthing1": {"X": 55, "Y": 19, "Z": -4},
        "Subthing2": { "Q": null, "W": [-2, -1, 0, 1] },
        "Distraction": [[], null, null]
    }
}

MaxInlineLength=30

{
    "LongArray": [
        2, 3, 5, 7, 11, 13, 17,
        19, 23, 29, 31, 37, 41,
        43, 47, 53, 59, 61, 67,
        71, 73, 79, 83, 89, 97,
        101, 103, 107, 109, 113,
        127, 131, 137, 139, 149,
        151, 157, 163, 167, 173,
        179, 181, 191, 193, 197,
        199
    ],
    "ComplexObject": {
        "Subthing1": {
            "X": 55,
            "Y": 19,
            "Z": -4
        },
        "Subthing2": {
            "Q": null,
            "W": [-2, -1, 0, 1]
        },
        "Distraction": [[], null, null]
    }
}

MaxInlineComplexity

Maximum nesting level that can be displayed on a single line. A primitive type or an empty array or object has a complexity of 0. An object or array has a complexity of 1 greater than its most complex child.

Example: MaxInlineComplexity=2

{
    "ComplexObject": {
        "Subthing1": {"X": 55, "Y": 19, "Z": -4},
        "Subthing2": { "Q": null, "W": [-2, -1, 0, 1] },
        "Distraction": [[], null, null]
    }
}

MaxInlineComplexity=1

{
    "ComplexObject": {
        "Subthing1": {"X": 55, "Y": 19, "Z": -4},
        "Subthing2": {
            "Q": null,
            "W": [-2, -1, 0, 1]
        },
        "Distraction": [[], null, null]
    }
}

MaxCompactArrayComplexity

Maximum nesting level that can be arranged spanning multiple lines, with multiple items per line.

Example: MaxCompactArrayComplexity=1

{
    "LongArray": [
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
        79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157,
        163, 167, 173, 179, 181, 191, 193, 197, 199
    ],
    "LongArray2": [
        [19, 2],
        [3, 8],
        [14, 0],
        [9, 9],
        [9, 9],
        [0, 3],
        [10, 1],
        [9, 1],
        [9, 2],
        [6, 13],
        [18, 5],
        [4, 11],
        [12, 2]
    ]
}

MaxCompactArrayComplexity=2

{
    "LongArray": [
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
        79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157,
        163, 167, 173, 179, 181, 191, 193, 197, 199
    ],
    "LongArray2": [
        [19, 2], [3, 8], [14, 0], [9, 9], [9, 9], [0, 3], [10, 1], [9, 1], [9, 2],
        [6, 13], [18, 5], [4, 11], [12, 2]
    ]
}

NestedBracketPadding

If an inlined array or object contains other (non-empty) arrays or objects, setting NestedBracketPadding to true will include spaces inside the outer brackets.

Example: NestedBracketPadding=true

{
    "TeamId": 2,
    "Placements": [
        { "UnitType": "Archer", "Position": [41, 7] },
        { "UnitType": "Pikeman", "Position": [40, 7] },
        { "UnitType": "Barricade", "Position": [39, 7] }
    ]
}

NestedBracketPadding=false

{
    "TeamId": 2,
    "Placements": [
        {"UnitType": "Archer", "Position": [41, 7]},
        {"UnitType": "Pikeman", "Position": [40, 7]},
        {"UnitType": "Barricade", "Position": [39, 7]}
    ]
}

ColonPadding

If true, includes a space after property colons.

Example: ColonPadding=true

{
    "TeamId": 2,
    "Placements": [
        { "UnitType": "Archer", "Position": [41, 7] },
        { "UnitType": "Pikeman", "Position": [40, 7] },
        { "UnitType": "Barricade", "Position": [39, 7] }
    ]
}

ColonPadding=false

{
    "TeamId":2,
    "Placements":[
        { "UnitType":"Archer", "Position":[41, 7] },
        { "UnitType":"Pikeman", "Position":[40, 7] },
        { "UnitType":"Barricade", "Position":[39, 7] }
    ]
}

CommaPadding

If true, includes a space after commas separating array items and object properties.

Example: CommaPadding=true

{
    "TeamId": 2,
    "Placements": [
        { "UnitType": "Archer", "Position": [41, 7] },
        { "UnitType": "Pikeman", "Position": [40, 7] },
        { "UnitType": "Barricade", "Position": [39, 7] }
    ]
}

CommaPadding=false

{
    "TeamId": 2,
    "Placements": [
        { "UnitType": "Archer","Position": [41,7] },
        { "UnitType": "Pikeman","Position": [40,7] },
        { "UnitType": "Barricade","Position": [39,7] }
    ]
}

JustifyNumberLists

If true, arrays that contain only numbers will be formatted with those numbers right-justified, padded to the length of the longest item.

Example: JustifyNumberLists=false

{
    "LongArray": [
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 
        79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 
        163, 167, 173, 179, 181, 191, 193, 197, 199
    ],
    "LongArray2": [
        [19, 2],
        [3, 8],
        [14, 0],
        [9, 9],
        [9, 9],
        [0, 3],
        [10, 1],
        [9, 1],
        [9, 2],
        [6, 13],
        [18, 5],
        [4, 11],
        [12, 2]
    ]
}

JustifyNumberLists=true

{
    "LongArray": [
          2,   3,   5,   7,  11,  13,  17,  19,  23,  29,  31,  37,  41,  43,  47,  53, 
         59,  61,  67,  71,  73,  79,  83,  89,  97, 101, 103, 107, 109, 113, 127, 131, 
        137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
    ],
    "LongArray2": [
        [19,  2],
        [3, 8],
        [14,  0],
        [9, 9],
        [9, 9],
        [0, 3],
        [10,  1],
        [9, 1],
        [9, 2],
        [ 6, 13],
        [18,  5],
        [ 4, 11],
        [12,  2]
    ]
}

AlwaysExpandDepth

Depth at which lists/objects are always fully expanded, regardless of other settings. -1 = none; 0 = root node only; 1 = root node and its children; etc.

Example: AlwaysExpandDepth=-1, MaxInlineLength=10000, MaxInlineComplexity=100, MaxCompactArrayComplexity=100

{ "AttackPlans": [ { "TeamId": 1, "Spawns": [ {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0}, {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0}, {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0} ] } ], "DefensePlans": [ { "TeamId": 2, "Placements": [ { "UnitType": "Archer", "Position": [41, 7] }, { "UnitType": "Pikeman", "Position": [40, 7] }, { "UnitType": "Barricade", "Position": [39, 7] } ] } ] }

AlwaysExpandDepth=0, MaxInlineLength=10000, MaxInlineComplexity=100, MaxCompactArrayComplexity=100

{
    "AttackPlans": [ { "TeamId": 1, "Spawns": [ {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0}, {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0}, {"Time": 0.0, "UnitType": "Grunt", "SpawnPointIndex": 0} ] } ],
    "DefensePlans": [ { "TeamId": 2, "Placements": [ { "UnitType": "Archer", "Position": [41, 7] }, { "UnitType": "Pikeman", "Position": [40, 7] }, { "UnitType": "Barricade", "Position": [39, 7] } ] } ]
}

IndentString

String composed of spaces and/or tabs specifying one unit of indentation.

Example: IndentString="\t"

{
	"TeamId": 2,
	"Placements": [
		{ "UnitType": "Archer", "Position": [41, 7] },
		{ "UnitType": "Pikeman", "Position": [40, 7] },
		{ "UnitType": "Barricade", "Position": [39, 7] }
	]
}

IndentString=" "

{
 "TeamId": 2,
 "Placements": [
  { "UnitType": "Archer", "Position": [41, 7] },
  { "UnitType": "Pikeman", "Position": [40, 7] },
  { "UnitType": "Barricade", "Position": [39, 7] }
 ]
}