On 19/11/2019 09:33, Richard Kosegi wrote:
Hi yangtools devs,
after upgraded jsonrpc to use yangtools 4.0.2, following code no longer
works as it used to:
NormalizedNode<?,?> data = ....
StringWriter writer = new StringWriter();
JsonWriter jsonWriter = JsonWriterFactory.createJsonWriter(writer);
NormalizedNodeStreamWriter jsonStream =
NormalizedNodeWriter nodeWriter =
String jsonValue = writer.toString()
jsonValue string is missing ending "}"
Is this bug or is there a way to force NormalizedNodeWriter to emit it?
NormalizedNodeWriter is a java.io. Closeable -- hence you should be
really closing it, which solves the problem.