Hi Daniel,
The fix is part of Restlet 1.1.1. I've done a test with SVN trunk (Restlet 1.2
snapshot) and it worked:
JSONArray jsonFeedEntry = new JSONArray();
jsonFeedEntry.put("Red");
jsonFeedEntry.put("Blue");
System.out.println("VALUES:"+jsonFeedEntry.toString());
Representation jr = new JsonRepresentation(jsonFeedEntry);
jr.write(System.out);
returns:
VALUES:["Red","Blue"]
["Red","Blue"]
Could you try to code above with Restlet 1.1.1 and let me know if it works?
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
-----Message d'origine-----
De : Daniel Woo [mailto:[email protected]]
Envoye : vendredi 9 janvier 2009 19:40
A : [email protected]
Objet : Re: JsonRepresentation(JSONArray jsonArray) Not working
In Restlet 1.1.1 the result is still
{"class":"class org.json.JSONArray"}
which version or patch you will have it?
So far, it's a little clumsy to query a list of resources like /rest/cars
without JSONArray
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1014190
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1023930