Updated Json Stream Writer to use gson JsonWriter.
Custom implementation of JSON writing methods has been replaced with native
com.google.gson.stream.JsonWriter methods. Among other things, this rework
resolves issues (bugs) with escape characters in string values being written
into Json (e.g. new lines in strings etc.).
Important notice: com.google.gson.stream.JsonWriter enforces that output
must start with '{' and end with '}', otherwise
'java.lang.IllegalStateException:Nesting problem' is thrown.
So our original output looks for an example like:
"my-module:top-container": {
...
}
Now, new output looks as following:
{
"my-module:top-container": {
...
}
}
.
Change-Id: I8073285d003015721d54887ddbff0484d7db89c8
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>