Hello Ben,

your first post has been moderated, but was lost in the list of posts... 
sorry.
Actually, the wrapped Representation is first parsed (in the private 
"getJsonText()" method) as JsonObject, even when the "write" method is 
called. Thus, it is difficult to know by advance the size of the text 
representation generated by the org.json library.
If the wrapped representation is not aimed to be parsed (in order to get 
a JsonObject, JsonArray, etc) and is only aimed to be written, the 
JsonRepresentation is useless.

Best regards,
Thierry Boileau

> JsonRepresentation has the member variable jsonRepresentation for
> using a wrapped Representation object in some cases. The bug I'm
> seeing is that getSize() on the JsonRepresentation object always
> returns -1 in those cases where it is backed by this other underlying
> representation. I believe a better behavior would be for
> JsonRepresntation to over getSize() to return
> jsonRepresentation.getSize() in those cases.
>
> I'm using 2.0-M5 (until M6 hits the public maven repo) but the problem
> looks like it is also in M6.
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427907
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2428085

Reply via email to