Here is a simple Web Service written using Jersey
@GET
@Produces(MediaType.APPLICATION_JSON)
public Object interpretationJson() {
String o = "a simple string";
return o;
}
The response for this is:
HTTP/1.1 200
Content-Type: application/json
Content-Length: 15
Date: Mon, 02 Oct 2017 23:18:14 GMT
a simple string
Shouldn't the string in the response body be quoted? I don't believe this is valid JSON. Shouldn't the response be:
HTTP/1.1 200
Content-Type: application/json
Content-Length: 15
Date: Mon, 02 Oct 2017 23:18:14 GMT
"a simple string"
This caused me a bit of confusion. I originally thought the problem was on the client side, but now I think the problem is the string returned from Jersey is not valid JSON - C# Parsing json that may have simple types