我有以下代码行:
StringWriter writer = new StringWriter();
JsonFactory jfactory = new JsonFactory();
JsonGenerator jGenerator = jfactory.createJsonGenerator(writer);
jGenerator.writeStartObject();
jGenerator.writeNumberField("ID", 1); //#1
.
.
//adding more fields, arrays etc... to jGenerator
.
.
jGenerator.writeEndObject();
jGenerator.close();
现在我希望在处理后用最终ID值更新#1行。有没有办法实现这个目标?