Hi,
On Tue, Sep 23, 2008 at 12:55 PM, Tobias Bocanegra
<[EMAIL PROTECTED]> wrote:
> ..i think this is intended and the value is the length of the binary
> property....
Yes that's correct, I had to dig up the corresponding code to find
out, in JsonResourceWriter:
// special handling for binaries: we dump the length and not the length
if (value instanceof InputStream
|| (values != null && values[0] instanceof InputStream)) {
// TODO for now we mark binary properties with an initial colon in
// their name
// (colon is not allowed as a JCR property name)
// in the name, and the value should be the size of the binary data
w.key(":" + key);
if (values == null) {
writeLength(w, valueMap, -1, key, (InputStream)value);
} else {
w.array();
for (int i = 0; i < values.length; i++) {
writeLength(w, valueMap, i, key, (InputStream)values[i]);
}
w.endArray();
}
return;
}
although the "we dump the length and not the length" comment is not
too helpful ;-)
-Bertrand