public class NamedJsonCodec<A> extends Object implements JsonCodec<A>
DecodeJson.DecodeJsonWithDefault<A>| Modifier and Type | Method and Description |
|---|---|
io.vavr.control.Option<A> |
defaultValue() |
DecodeResult<A> |
fromJson(Json.JValue value) |
static <A> NamedJsonCodec<A> |
of(String name,
JsonCodec<A> codec) |
FieldDecoder<A> |
toFieldDecoder() |
FieldEncoder<A> |
toFieldEncoder() |
Json.JValue |
toJson(A value) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfield, lift, lift, named, narrow, tryNarrow, withDefaultValue, xmap, xmapicontramap, fieldEncoder, toJsonUnsafeand, either, either, fieldDecoder, filter, filter, flatMap, fromJsonUnsafe, map, or, sequence, successful, tryMappublic final String name
public static <A> NamedJsonCodec<A> of(String name, JsonCodec<A> codec)
public FieldDecoder<A> toFieldDecoder()
public FieldEncoder<A> toFieldEncoder()
public DecodeResult<A> fromJson(Json.JValue value)
fromJson in interface DecodeJson<A>public Json.JValue toJson(A value)
toJson in interface EncodeJson<A>public io.vavr.control.Option<A> defaultValue()
defaultValue in interface DecodeJson<A>Copyright © 2015–2017. All rights reserved.