@Override public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
sort = alpha.booleanValue(); String[] propertyOrder = intr.findSerializationPropertyOrder(_classDef);
@Override public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
sort = alpha.booleanValue(); String[] propertyOrder = intr.findSerializationPropertyOrder(_classDef);
@Override public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
@Override public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
@Override public String[] findSerializationPropertyOrder(AnnotatedClass ac) { String[] result = _primary.findSerializationPropertyOrder(ac); if (result == null) { result = _secondary.findSerializationPropertyOrder(ac); } return result; }
sort = alpha.booleanValue(); String[] propertyOrder = intr.findSerializationPropertyOrder(_classDef);
sort = alpha.booleanValue(); String[] propertyOrder = intr.findSerializationPropertyOrder(_classDef);
/** * Overridable method that will impose given partial ordering on * list of discovered propertied. Method can be overridden to * provide custom ordering of properties, beyond configurability * offered by annotations (whic allow alphabetic ordering, as * well as explicit ordering by providing array of property names). *<p> * By default Creator properties will be ordered before other * properties. Explicit custom ordering will override this implicit * default ordering. */ protected List<BeanPropertyWriter> sortBeanProperties(SerializationConfig config, BasicBeanDescription beanDesc, List<BeanPropertyWriter> props) { // Ok: so far so good. But do we need to (re)order these somehow? /* Yes; first, for [JACKSON-90] (explicit ordering and/or alphabetic) * and then for [JACKSON-170] (implicitly order creator properties before others) */ List<String> creatorProps = beanDesc.findCreatorPropertyNames(); // Then how about explicit ordering? AnnotationIntrospector intr = config.getAnnotationIntrospector(); AnnotatedClass ac = beanDesc.getClassInfo(); String[] propOrder = intr.findSerializationPropertyOrder(ac); Boolean alpha = intr.findSerializationSortAlphabetically(ac); boolean sort = (alpha != null) && alpha.booleanValue(); if (sort || !creatorProps.isEmpty() || propOrder != null) { props = _sortBeanProperties(props, creatorProps, propOrder, sort); } return props; }
String[] propOrder = intr.findSerializationPropertyOrder(ac); Boolean alpha = intr.findSerializationSortAlphabetically(ac); boolean sort;