Uploaded image for project: 'S2Graph'
  1. S2Graph
  2. S2GRAPH-186

http api graphs/vertices/insert has wrong escaping of double quotation marks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Minor
    • Resolution: Done
    • 0.2.0
    • None
    • None
    • None

    Description

      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}]

      Attachments

        Issue Links

          Activity

            People

              steamshon Do Yung Yoon
              sandyskies chenmingjie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: