Stored byte array is read as base64 string


#1

Hi,
when I store a byte array in a document property it seems to be converted to a base64 encoded string in the DB.
But when querying the document the value is not decoded. Instead the base64 string is returned in the LinkedHashMap.
The JSON parser probably does not check if the string is base64 and thus returns it as it is. Is this behaviour intended?


#2

Hi @Mav3ric,

I assume you are using Couchbase Lite Android or Java.

Couchbase Lite Android/Java uses Jackson (http://wiki.fasterxml.com/JacksonHome) for converting between Java Map object and JSON string. I believe this behavior is based on Jackson’s implementation.

Hope this helps you!