Hello Adrian,

as a workaround, you can instantiate the JSonRepresentation as follow:

result = new JsonRepresentation(jsonFeedEntry.toString());
I've created an RFC for this issue => http://restlet.tigris.org/issues/show_bug.cgi?id=645

The fix will come soon.

best regards,
Thierry Boileau

Hello, we are testing the following code in a Java class"

JSONArray jsonFeedEntry = new JSONArray();
jsonFeedEntry.put("Red");
jsonFeedEntry.put("Blue");
System.out.println("VALUES:"+jsonFeedEntry.toString());
result = new JsonRepresentation(jsonFeedEntry);

It seems to print out the proper information but nothing is being returned in 
the result for some reason. If we change the same code and add the following, 
it works fine with the JSONObject:

JSONObject jsonobj = new JSONObject();
jsonobj.put("id","ID..");
jsonobj.put("name", "NAME...");
result = new JsonRepresentation(jsonobj);

Any reason or documentation on how to get it working properly with the 
JSONArray class? Thanks.

Adrian




  

Reply via email to