I am trying to add JSONObject inside properties of segmentIO analytics but it is showing json as String on server.
Here is my code:
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("abc", "xyz");
properties.putValue("extras", jsonObject);
Analytics.with(context).track(event, properties);
Output:
extras : "{"abc","xyz"}"
Expected Output:
extras : {"abc","xyz"}
Use JSONParser (org.json.simple.parser.JSONParser)