geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Martell (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GEODE-2794) REST API Doesn't Accept Primitive Types as Values
Date Tue, 18 Apr 2017 17:02:41 GMT
Michael Martell created GEODE-2794:
--------------------------------------

             Summary: REST API Doesn't Accept Primitive Types as Values
                 Key: GEODE-2794
                 URL: https://issues.apache.org/jira/browse/GEODE-2794
             Project: Geode
          Issue Type: Bug
          Components: client/server, rest (dev)
            Reporter: Michael Martell


Plain text is valid JSON, but is not supported by the REST API. Same issue for all primitive
types: bool, number, arrays. Only objects are accepted.

Repro example below. Putting the same value from another client works, and we are able to
get primitive values.
PUT /gemfire-api/v1/orders/234
Request body:
```
"hello"
```

Response:
HTTP 400
Response body:
```
{
  "cause": "Json doc specified is either not supported or invalid!"
}
```

Wrapping the same request as:
```
{"value":"hello"}
```
succeeds (HTTP 200, and entry is saved).

Experienced on Geode 9.0.2.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message