You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "chenmingjie (JIRA)" <ji...@apache.org> on 2018/03/21 13:36:00 UTC

[jira] [Commented] (S2GRAPH-186) http api graphs/vertices/insert has wrong escaping of double quotation marks

    [ https://issues.apache.org/jira/browse/S2GRAPH-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407907#comment-16407907 ] 

chenmingjie commented on S2GRAPH-186:
-------------------------------------

I will create a pr to fix this

> http api  graphs/vertices/insert has wrong escaping  of double quotation marks 
> -------------------------------------------------------------------------------
>
>                 Key: S2GRAPH-186
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-186
>             Project: S2Graph
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: chenmingjie
>            Priority: Minor
>
> 1,create service 
> curl -XPOST localhost:9000/graphs/createServiceColumn -H 'Content-Type: Application/json' -d '
> {
> "serviceName": "testApi",
> "columnName": "stringCn",
> "columnType": "string",
> "props": []
> }
> '
> 2, insert vertices
> curl -XPOST localhost:9000/graphs/vertices/insert/testApi/stringCn -H 'Content-Type: Application/json' -d '
> [
> {"id":"a","props":{},"timestamp":1517616431}
> ]
> '
> 3, query without escaping 
> curl -XPOST localhost:9000/graphs/getVertices -H 'Content-Type: Application/json' -d '
> [
> {"serviceName": "testApi", "columnName": "stringCn", "ids": ["a"]}
> ]
> '
> 4, howerver, query with double quotation marks
> curl -XPOST localhost:9000/graphs/getVertices -H 'Content-Type: Application/json' -d '
> [
> {"serviceName": "testApi", "columnName": "stringCn", "ids": ["\"a\""]}
> ]
> '
> result
> [\{"serviceName":"testApi","columnName":"stringCn","id":"\"a\"","props":{"lastModifiedAt":1517616431,"_timestamp":1517616431},"timestamp":1517616431}]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)