If I have the following array of JSON objects in Sublime, it will collapse at any "[". My ask is if this can be changed to fold at any "{"
Taking this JSON array
[{"a":[{"b":1,"c":2},{"d":3},{"x":99,"y":100}],"b":4},{"a":[{"b":5,"c":6}],"b":7}]
and pretty formatting it within the same file
[
{
"a": [
{
"b": 1,
"c": 2
},
{
"d": 3
},
{
"x": 99,
"y": 100
}
],
"b": 4
},
{
"a": [
{
"b": 5,
"c": 6
}
],
"b": 7
}
]
As an example of it working mostly the way I am looking for, with the JSON below, it will collapse at any "{" with more than one element, so {"d":3} does not collapse:
{
"a": [
{
"b": 1,
"c": 2
},
{
"d": 3
},
{
"x": 99,
"y": 100
}
],
"b": 4
}
Edit - it looks like if I take the formatted array into a new file, it will recognize all potential folding points.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…