Top Fields Constructors Methods
com.fasterxml.jackson.databind.ext

public Class NioPathSerializer

extends StdScalarSerializer<Path>
Class Inheritance
Imports
java.io.IOException, java.nio.file.Path, com.fasterxml.jackson.core.JsonGenerator, .JsonToken, com.fasterxml.jackson.core.type.WritableTypeId, com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.ser.std.StdScalarSerializer

Deprecated

as a consequence of StdScalarSerializer being deprecated. See corresponding docs for further information.

Since
2.8

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
serialize(Path
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
gen
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
serializers
)

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.
public void
serializeWithType(Path
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
g
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
provider
,
TypeSerializer
Type serializer to use for including type information
typeSer
)

Overrides com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix.
Inherited from com.fasterxml.jackson.databind.ser.std.StdScalarSerializer:
acceptJsonFormatVisitorgetSchema

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.ser.std.StdSerializer.serialVersionUID.

Constructor Detail

NioPathSerializerback to summary
public NioPathSerializer()

Method Detail

serializeback to summary
public void serialize(Path value, JsonGenerator gen, SerializerProvider serializers) throws IOException

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters
value:Path

Value to serialize; can not be null.

gen:JsonGenerator

Generator used to output resulting Json content

serializers:SerializerProvider

Provider that can be used to get serializers for serializing Objects value contains, if any.

Annotations
@Override
serializeWithTypeback to summary
public void serializeWithType(Path value, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) throws IOException

Overrides com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Doc from com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.

Parameters
value:Path

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Value to serialize; can not be null.

g:JsonGenerator

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Generator used to output resulting Json content

provider:SerializerProvider

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Provider that can be used to get serializers for serializing Objects value contains, if any.

typeSer:TypeSerializer

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Type serializer to use for including type information

Annotations
@Override