} else if (type == byte[].class) {
return Base64.encodeBytes((byte[]) val);
}
else if (ClassInfo.isEmbedded(field)) {
Embedded embed = field.getAnnotation(Embedded.class);
switch(embed.mode()){
case SERIALIZE_JSON:
return JsonSerializer.serialize(val).toString();
case SERIALIZE_JAVA:
// this embedding mode doesn't manage @EmbedIgnores
try {