I defined a very simple JAX-RS service with JSON. It works well for complex
data types, but when I use simple types, like boolean or String, I get
malformed JSON data.

...
    @POST
    @Path("/checkString")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public boolean validate(String myString);
...


In order to get, lets say "someString" in the method validate(), I have to
POST exactly this:
someString

If I post
"someString"
or
{"string" : "someString"}
it won't work (won't de-marshall correctly), because the quotes and
brackets are not removed!


Furthermore the reply of the validate() method is no valid JSON either.
It's simply
true (or false)

But not
"true"
or
{"booleanValue" : "true"}


Does CXF have issues with marshalling/demarshalling simple types correctly
to/from JSON?

Reply via email to