private static boolean encodeObject(Writer writer, Object value, boolean allowJsonResolve) throws Exception {
Converter converter = Converters.getConverter(value.getClass(), String.class);
if (converter != null) {
Class clz = converter.getSourceClass();
String str = (String) converter.convert(value);
if (clz != null) {
writer.write(clz.getName());
} else {
writer.write(value.getClass().getName());
}