return;
/*
* Default
*/
Class<?> type = obj.getClass();
JsonEntity jen = Json.getEntity(Mirror.me(type));
Method toJsonMethod = jen.getToJsonMethod();
if (toJsonMethod != null) {
try {
if (toJsonMethod.getParameterTypes().length == 0) {
writer.append(String.valueOf(toJsonMethod.invoke(obj)));
} else {
writer.append(String.valueOf(toJsonMethod.invoke(obj, format)));
}
return;
}
catch (Exception e) {
throw Lang.wrapThrow(e);
}
}
List<JsonEntityField> fields = jen.getFields();
appendBraceBegin();
increaseFormatIndent();
ArrayList<Pair> list = new ArrayList<Pair>(fields.size());
for (JsonEntityField jef : fields) {
String name = jef.getName();