atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Kantor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ATLAS-586) While updating the multiple attributes, Atlas returns the response with escape characters.
Date Thu, 31 Mar 2016 13:07:25 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Kantor updated ATLAS-586:
-------------------------------
    Description: 
While updating the multiple attributes, Atlas returns the response entity with escape characters
in the definition property value, which causes a JsonSyntaxException when using GSON to convert
the entity string to a Java object.

$ curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -d @updateInstances.json
http://localhost:21000/api/atlas/entities
{"requestId":"qtp-897180322-29 - 764c42a3-6b94-47dc-825f-85ebb12fa9ea","GUID":["a8101113-52e3-445d-b30f-96b8cfd99c8d"],"definition":"{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n \"id\":{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n \"id\":\"a8101113-52e3-445d-b30f-96b8cfd99c8d\",\n
\"version\":0,\n \"typeName\":\"UpdateInstancesPackage_Account\"\n },\n \"typeName\":\"UpdateInstancesPackage_Account\",\n
\"values\":{\n \"signators\":null,\n \"number\":\"acc1\",\n \"omContainerId\":null,\n \"omDeleted\":false,\n
\"omCreatedByUser\":\"oms\",\n \"lastModified\":null,\n \"balance\":5000.0,\n \"omModificationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"omOptimisticLockId\":0,\n \"omModifiedByUser\":\"oms\",\n \"omCreationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"props\":null,\n \"recentDeposits\":null,\n \"recentDepositAmounts\":null\n },\n \"traitNames\":[\n
\n ],\n \"traits\":{\n \n }\n}"}


 

  was:
While updating the multiple attributes, Atlas returns the response with escape characters.

$ curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -d @updateInstances.json
http://localhost:21000/api/atlas/entities
{"requestId":"qtp-897180322-29 - 764c42a3-6b94-47dc-825f-85ebb12fa9ea","GUID":["a8101113-52e3-445d-b30f-96b8cfd99c8d"],"definition":"{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n \"id\":{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n \"id\":\"a8101113-52e3-445d-b30f-96b8cfd99c8d\",\n
\"version\":0,\n \"typeName\":\"UpdateInstancesPackage_Account\"\n },\n \"typeName\":\"UpdateInstancesPackage_Account\",\n
\"values\":{\n \"signators\":null,\n \"number\":\"acc1\",\n \"omContainerId\":null,\n \"omDeleted\":false,\n
\"omCreatedByUser\":\"oms\",\n \"lastModified\":null,\n \"balance\":5000.0,\n \"omModificationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"omOptimisticLockId\":0,\n \"omModifiedByUser\":\"oms\",\n \"omCreationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"props\":null,\n \"recentDeposits\":null,\n \"recentDepositAmounts\":null\n },\n \"traitNames\":[\n
\n ],\n \"traits\":{\n \n }\n}"}


 


> While updating the multiple attributes, Atlas returns the response with escape characters.
> ------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-586
>                 URL: https://issues.apache.org/jira/browse/ATLAS-586
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.7-incubating
>            Reporter: Ankur Verma
>            Assignee: David Kantor
>             Fix For: 0.7-incubating
>
>         Attachments: updateInstances.json
>
>
> While updating the multiple attributes, Atlas returns the response entity with escape
characters in the definition property value, which causes a JsonSyntaxException when using
GSON to convert the entity string to a Java object.
> $ curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -d @updateInstances.json
http://localhost:21000/api/atlas/entities
> {"requestId":"qtp-897180322-29 - 764c42a3-6b94-47dc-825f-85ebb12fa9ea","GUID":["a8101113-52e3-445d-b30f-96b8cfd99c8d"],"definition":"{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n \"id\":{\n
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n \"id\":\"a8101113-52e3-445d-b30f-96b8cfd99c8d\",\n
\"version\":0,\n \"typeName\":\"UpdateInstancesPackage_Account\"\n },\n \"typeName\":\"UpdateInstancesPackage_Account\",\n
\"values\":{\n \"signators\":null,\n \"number\":\"acc1\",\n \"omContainerId\":null,\n \"omDeleted\":false,\n
\"omCreatedByUser\":\"oms\",\n \"lastModified\":null,\n \"balance\":5000.0,\n \"omModificationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"omOptimisticLockId\":0,\n \"omModifiedByUser\":\"oms\",\n \"omCreationTimestamp\":\"2016-03-22T19:45:05.445Z\",\n
\"props\":null,\n \"recentDeposits\":null,\n \"recentDepositAmounts\":null\n },\n \"traitNames\":[\n
\n ],\n \"traits\":{\n \n }\n}"}
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message