[
https://issues.apache.org/jira/browse/GEODE-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Martell updated GEODE-2794:
-----------------------------------
Description:
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.
was:
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.
> 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)