@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(SerializationFeature.WRAP_ROOT_VALUE); }
@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE); }
public Linked(T v, Linked<T> n, PropertyName name, boolean explName, boolean visible, boolean ignored) { value = v; next = n; // ensure that we'll never have missing names this.name = (name == null || name.isEmpty()) ? null : name; if (explName) { if (this.name == null) { // sanity check to catch internal problems throw new IllegalArgumentException("Cannot pass true for 'explName' if name is null/empty"); } // 03-Apr-2014, tatu: But how about name-space only override? // Probably should not be explicit? Or, need to merge somehow? if (!name.hasSimpleName()) { explName = false; } } isNameExplicit = explName; isVisible = visible; isMarkedIgnored = ignored; }
/** * @deprecated since 2.8 */ @Deprecated // since 2.8, not used at least since 2.7 protected PropertyName _findCreatorPropertyName(AnnotatedParameter param) { PropertyName name = _annotationIntrospector.findNameForDeserialization(param); if (name == null || name.isEmpty()) { String str = _annotationIntrospector.findImplicitPropertyName(param); if (str != null && !str.isEmpty()) { name = PropertyName.construct(str); } } return name; }
gen.writeFieldName(pname.simpleAsEncoded(_config)); } else if (rootName.isEmpty()) { wrap = false; } else {
boolean expl = (pn != null && !pn.isEmpty()); if (!expl) { if (impl.isEmpty()) {
/** * The method to be called by {@link ObjectMapper} and {@link ObjectWriter} * for serializing given value, using serializers that * this provider has access to (via caching and/or creating new serializers * as need be). */ public void serializeValue(JsonGenerator gen, Object value) throws IOException { _generator = gen; if (value == null) { _serializeNull(gen); return; } final Class<?> cls = value.getClass(); // true, since we do want to cache root-level typed serializers (ditto for null property) final JsonSerializer<Object> ser = findTypedValueSerializer(cls, true, null); PropertyName rootName = _config.getFullRootName(); if (rootName == null) { // not explicitly specified if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { _serialize(gen, value, ser, _config.findRootName(cls)); return; } } else if (!rootName.isEmpty()) { _serialize(gen, value, ser, rootName); return; } _serialize(gen, value, ser); }
return; } else if (!rootName.isEmpty()) { _serialize(gen, value, ser, rootName); return;
return; } else if (!rootName.isEmpty()) { _serialize(gen, value, ser, rootName); return;
boolean nameExplicit = hasName; if (nameExplicit && pn.isEmpty()) { // empty String meaning "use default name", here just means "same as field name" pn = _propNameFromSimple(implName); nameExplicit = false;
implName = m.getName(); if (pn.isEmpty()) {
implName = m.getName(); if (pn.isEmpty()) {
if (name == null || name.isEmpty()) { continue main_loop;
if (impl == null || impl.isEmpty()) {
@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE); }
@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(SerializationFeature.WRAP_ROOT_VALUE); }
@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(SerializationFeature.WRAP_ROOT_VALUE); }
@Override public boolean useRootWrapping() { if (_rootName != null) { // empty String disables wrapping; non-empty enables return !_rootName.isEmpty(); } return isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE); }
protected PropertyName _findCreatorPropertyName(AnnotatedParameter param) { PropertyName name = _annotationIntrospector.findNameForDeserialization(param); if (name == null || name.isEmpty()) { String str = _annotationIntrospector.findImplicitPropertyName(param); if (str != null && !str.isEmpty()) { name = new PropertyName(str); } } return name; }
protected PropertyName _findCreatorPropertyName(AnnotatedParameter param) { PropertyName name = _annotationIntrospector.findNameForDeserialization(param); if (name == null || name.isEmpty()) { String str = _annotationIntrospector.findImplicitPropertyName(param); if (str != null && !str.isEmpty()) { name = new PropertyName(str); } } return name; }