mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
fix indents for child elements when using -1 (#2119)
This commit is contained in:
@@ -1790,9 +1790,10 @@ public class JSONObject {
|
||||
if (actualFactor > 0) {
|
||||
writer.write(' ');
|
||||
}
|
||||
writeValue(writer, this.map.get(key), actualFactor, indent);
|
||||
//writeValue(writer, this.map.get(key), actualFactor, indent);
|
||||
writeValue(writer, this.map.get(key), indentFactor, indent);
|
||||
} else if (length != 0) {
|
||||
final int newindent = indent + actualFactor;
|
||||
final int newIndent = indent + actualFactor;
|
||||
while (keys.hasNext()) {
|
||||
Object key = keys.next();
|
||||
if (commanate) {
|
||||
@@ -1801,14 +1802,14 @@ public class JSONObject {
|
||||
if (indentFactor != -1) {
|
||||
writer.write('\n');
|
||||
}
|
||||
indent(writer, newindent);
|
||||
indent(writer, newIndent);
|
||||
writer.write(quote(key.toString()));
|
||||
writer.write(':');
|
||||
if (actualFactor > 0) {
|
||||
writer.write(' ');
|
||||
}
|
||||
writeValue(writer, this.map.get(key), actualFactor,
|
||||
newindent);
|
||||
//writeValue(writer, this.map.get(key), actualFactor, newIndent);
|
||||
writeValue(writer, this.map.get(key), indentFactor, newIndent);
|
||||
commanate = true;
|
||||
}
|
||||
if (indentFactor != -1) {
|
||||
|
||||
Reference in New Issue
Block a user