I am using the WINK implementation shipped with WebSphere V8. I have came 
across an issue that I think may be a possible bug. I am also using JSON 
Jackson that is shipped as part of WebSphere runtime for JSON/Object 
conversions.

When I have the following line in my handler:

return Response.ok(user.getName()).build();

I get the following exception on the client when I try to get the Name value

org.codehaus.jackson.JsonParseException: Unexpected character ('c' (code 99)): 
....

Looking at my response I see the name Doe,Jhon there. Note that the name String 
is not quoted and hence the parser fails.

Now if I go and change my server code to 

 return Response.ok("\""+user.getName()+"\"").build();

The response would look as "Doe,John" and hence all works and I get no 
exception on the client side.

When one or more Java objects are returned as part of response in 'ok' method, 
I see all property name and values as quoted and not sure why a single String 
value is not.

I am not sure whether this is a bug in JSON provider [JSON Jackson shipped in 
WebSphere]  I use on the Server or a bug in WINK.                               
            

Reply via email to