Commit 177011cf by Shwetha GS

ATLAS-208 Remove n characters in the REST API json response (patel_satya via shwethags)

parent 92490b9e
......@@ -4,6 +4,7 @@ Apache Atlas Release Notes
--trunk - unreleased
INCOMPATIBLE CHANGES:
ATLAS-208 Remove "\n" characters in the REST API json response (patel_satya via shwethags)
ATLAS-58 Make hive hook reliable (shwethags)
ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
......
......@@ -118,7 +118,7 @@ public class EntityResource {
JSONObject response = new JSONObject();
response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
response.put(AtlasClient.GUID, new JSONArray(guids));
response.put(AtlasClient.DEFINITION, metadataService.getEntityDefinition(new JSONArray(guids).getString(0)));
response.put(AtlasClient.DEFINITION, new JSONObject(metadataService.getEntityDefinition(new JSONArray(guids).getString(0))));
return Response.created(locationURI).entity(response).build();
......@@ -157,7 +157,7 @@ public class EntityResource {
Response.Status status = Response.Status.NOT_FOUND;
if (entityDefinition != null) {
response.put(AtlasClient.DEFINITION, entityDefinition);
response.put(AtlasClient.DEFINITION, new JSONObject(entityDefinition));
status = Response.Status.OK;
} else {
response.put(AtlasClient.ERROR,
......@@ -244,7 +244,7 @@ public class EntityResource {
Response.Status status = Response.Status.NOT_FOUND;
if (entityDefinition != null) {
response.put(AtlasClient.DEFINITION, entityDefinition);
response.put(AtlasClient.DEFINITION, new JSONObject(entityDefinition));
status = Response.Status.OK;
} else {
response.put(AtlasClient.ERROR, Servlets.escapeJsonString(String.format("An entity with type={%s}, " +
......
......@@ -123,7 +123,7 @@ public class TypesResource {
JSONObject response = new JSONObject();
response.put(AtlasClient.TYPENAME, typeName);
response.put(AtlasClient.DEFINITION, typeDefinition);
response.put(AtlasClient.DEFINITION, new JSONObject(typeDefinition));
response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
return Response.ok(response).build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment