mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-05 21:28:00 +08:00
fix riter
This commit is contained in:
parent
57b6c7dff2
commit
d9a218f02c
@ -61,6 +61,13 @@ public class JSONWriter {
|
|||||||
*/
|
*/
|
||||||
private boolean arrayMode;
|
private boolean arrayMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造
|
||||||
|
* @param writer {@link Writer}
|
||||||
|
* @param indentFactor 缩进因子,定义每一级别增加的缩进量
|
||||||
|
* @param indent 本级别缩进量
|
||||||
|
* @param config JSON选项
|
||||||
|
*/
|
||||||
public JSONWriter(Writer writer, int indentFactor, int indent, JSONConfig config) {
|
public JSONWriter(Writer writer, int indentFactor, int indent, JSONConfig config) {
|
||||||
this.writer = writer;
|
this.writer = writer;
|
||||||
this.indentFactor = indentFactor;
|
this.indentFactor = indentFactor;
|
||||||
@ -104,6 +111,7 @@ public class JSONWriter {
|
|||||||
throw new IORuntimeException(e);
|
throw new IORuntimeException(e);
|
||||||
}
|
}
|
||||||
arrayMode = false;
|
arrayMode = false;
|
||||||
|
// 当前对象或数组结束,当新的
|
||||||
needSeparator = true;
|
needSeparator = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user