if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { rootName = (rootType == null) ? _config.findRootName(value.getClass()) : _config.findRootName(rootType); _serialize(gen, value, ser, rootName); return;
if (wrap) { gen.writeStartObject(); PropertyName pname = _config.findRootName(value.getClass()); gen.writeFieldName(pname.simpleAsEncoded(_config));
/** * 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); }
if (rootName == null) { // not explicitly specified if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { _serialize(gen, value, ser, _config.findRootName(rootType)); return;
if (wrap) { gen.writeStartObject(); PropertyName pname = _config.findRootName(value.getClass()); gen.writeFieldName(pname.simpleAsEncoded(_config));
gen.writeStartObject(); PropertyName pname = (rootType == null) ? _config.findRootName(value.getClass()) : _config.findRootName(rootType); gen.writeFieldName(pname.simpleAsEncoded(_config));
if (wrap) { gen.writeStartObject(); PropertyName pname = _config.findRootName(value.getClass()); gen.writeFieldName(pname.simpleAsEncoded(_config));
if (wrap) { gen.writeStartObject(); PropertyName pname = _config.findRootName(value.getClass()); gen.writeFieldName(pname.simpleAsEncoded(_config));
if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { rootName = (rootType == null) ? _config.findRootName(value.getClass()) : _config.findRootName(rootType); _serialize(gen, value, ser, rootName); return;
if (wrap) { gen.writeStartObject(); PropertyName pname = _config.findRootName(value.getClass()); gen.writeFieldName(pname.simpleAsEncoded(_config));
/** * 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); }
if (rootName == null) { // not explicitly specified if (_config.isEnabled(SerializationFeature.WRAP_ROOT_VALUE)) { _serialize(gen, value, ser, _config.findRootName(rootType)); return;