Details
-
Bug
-
Resolution: Fixed
-
Low
-
7.0.0
-
7
-
Description
If the JSON input for issue properties is in a pretty format then accepts the property
but fails to render it back in GET
For example:
PUT http://localhost:8090/jira/rest/api/2/issue/BAS-1/properties/key1
{"content": "Test if works on JIRA Cloud", "completed" : 1}
works as expected. A GET on this will return the value
But if you have a JSON object with new lines like
PUT http://localhost:8090/jira/rest/api/2/issue/BAS-1/properties/key1
{ "content": "Test if works on JIRA Cloud", "completed" : 1 }
Then it will be accepted but will fail to read (but with a 200
GET http://localhost:8090/jira/rest/api/2/issue/BAS-1/properties/key1
200 : Malformed JSON: Bad string
The problem is that the Jackson mapping on RawValues
EntityPropertyBean has
@JsonProperty
@JsonRawValue
private String value;
It will try to turn the "json" string into raw object BUT it fails serialise it when "newline" whitespace if present. Spaces and tabs seem ok but not new lines.
Not this is on the GET - the PUT works ok!