public void serialize(Object propertySource, ObjectWriter writer, Context ctx) { Object propertyValue = access(propertySource); writer.writeEscapedName(escapedName); try { propertySerializer.serialize(propertyValue, writer, ctx); } catch (Throwable th) { throw couldNotSerialize(th); } }
protected JsonBindingException couldNotAccess(Exception e) { return new JsonBindingException("Could not access value of property named '" + name + "' using accessor " + signature() + " from class " + declaringClass.getName(), e); }
@Override protected PropertyAccessor checkAndMergeAccessors(String name, LinkedList<PropertyAccessor> accessors) { PropertyAccessor accessor = _mostSpecificPropertyDeclaringClass(name, accessors); return VisibilityFilter.ABSTRACT.isVisible(accessor.getModifiers()) ? accessor : null; }
public void serialize(T obj, ObjectWriter writer, Context ctx) { writer.beginObject(); RuntimePropertyFilter runtimePropertyFilter = ctx.genson.runtimePropertyFilter(); for (PropertyAccessor accessor : accessibleProperties) { if (runtimePropertyFilter.shouldInclude(accessor, ctx)) accessor.serialize(obj, writer, ctx); } writer.endObject(); }
@Override protected PropertyAccessor checkAndMergeAccessors(String name, LinkedList<PropertyAccessor> accessors) { PropertyAccessor accessor = _mostSpecificPropertyDeclaringClass(name, accessors); return VisibilityFilter.ABSTRACT.isVisible(accessor.getModifiers()) ? accessor : null; }
public void serialize(T obj, ObjectWriter writer, Context ctx) { writer.beginObject(); RuntimePropertyFilter runtimePropertyFilter = ctx.genson.runtimePropertyFilter(); for (PropertyAccessor accessor : accessibleProperties) { if (runtimePropertyFilter.shouldInclude(accessor, ctx)) accessor.serialize(obj, writer, ctx); } writer.endObject(); }
public void serialize(Object propertySource, ObjectWriter writer, Context ctx) { Object propertyValue = access(propertySource); writer.writeEscapedName(escapedName); try { propertySerializer.serialize(propertyValue, writer, ctx); } catch (Throwable th) { throw couldNotSerialize(th); } }
protected JsonBindingException couldNotAccess(Exception e) { return new JsonBindingException("Could not access value of property named '" + name + "' using accessor " + signature() + " from class " + declaringClass.getName(), e); }