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