Set pretty print on JSON creation 13/69913/1
authorliamfallon <liam.fallon@ericsson.com>
Fri, 5 Oct 2018 12:28:30 +0000 (13:28 +0100)
committerliamfallon <liam.fallon@ericsson.com>
Fri, 5 Oct 2018 12:28:37 +0000 (13:28 +0100)
Pretty printing was set off, making debugging of JSON
messages more difficult.

Issue-ID: POLICY-954
Change-Id: Ifcc32cdba822f2bfc105c99cc3dc85ee05a89f6f
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelper.java

index fcc7c4d..407239a 100644 (file)
@@ -248,7 +248,7 @@ public class JavaSchemaHelper extends AbstractSchemaHelper {
      * @return the GSON instance
      */
     private Gson getGson() {
-        GsonBuilder gsonBuilder = new GsonBuilder();
+        GsonBuilder gsonBuilder = new GsonBuilder().setPrettyPrinting();
 
         // Get the Java schema helper parameters from the parameter service
         SchemaParameters schemaParameters = ParameterService.get(ContextParameterConstants.SCHEMA_GROUP_NAME);