users@jersey.java.net

Json representation in google app engine

From: Rahul Juneja <rahul.juneja_at_gmail.com>
Date: Wed, 19 May 2010 11:30:20 -0400

I was trying to return json in google app engine and is says Mime type not
supported. What can be the possible reason.

My exception & code i am using is as follows.

****************************************************************************
*Exception*
SEVERE: A message body writer for Java type, class
com.thoughtclicks.vo.ApplicationResponse, and MIME media type,
application/json, was not found

*My Code: is as follows.*

@GET
@Produces("application/json")
public ApplicationResponse translate(@QueryParam("msisdn") String url) {
         ApplicationResponse appResponse = new ApplicationResponse();
         appResponse.setResponse("Some String");
         return appResponse;

}


Also, when i return xml it just works fine.

Any help on this is appreciated.

Thanks,
Rahul
----------------------------------------------------------
Rahul Juneja
http://techlabs.thoughtclicks.com