public class NamedJsonCodec<A> extends Object implements JsonCodec<A>
DecodeJson.DecodeJsonWithDefault<A>| Modifier and Type | Method and Description |
|---|---|
javaslang.control.Option<A> |
defaultValue() |
DecodeResult<A> |
fromJson(Json.JValue value) |
static <A> NamedJsonCodec<A> |
of(String name,
JsonCodec<A> codec) |
javaslang.control.Option<Json.JValue> |
toJson(A value) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlift, named, narrow, narrowBoth, tryNarrow, tryNarrowBoth, xmapcontramap, toJsonUnsafeflatMap, fromJsonUnsafe, map, tryMap, withDefaultValuepublic final String name
public static <A> NamedJsonCodec<A> of(String name, JsonCodec<A> codec)
public DecodeResult<A> fromJson(Json.JValue value)
fromJson in interface DecodeJson<A>public javaslang.control.Option<Json.JValue> toJson(A value)
toJson in interface EncodeJson<A>public javaslang.control.Option<A> defaultValue()
defaultValue in interface DecodeJson<A>Copyright © 2015–2017. All rights reserved.