Class JsonLfEncoders
java.lang.Object
com.daml.ledger.javaapi.data.codegen.json.JsonLfEncoders
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <I,
O> O static JsonLfEncoder
static <Cid extends ContractId<?>>
JsonLfEncodercontractId
(Cid value) static JsonLfEncoder
static <E extends DamlEnum<E>>
Function<E,JsonLfEncoder> enumeration
(Function<E, String> toDamlName) static <K,
V> Function<Map<K, V>, JsonLfEncoder> genMap
(Function<K, JsonLfEncoder> keyEncoder, Function<V, JsonLfEncoder> valueEncoder) static JsonLfEncoder
static <T> Function<List<T>,
JsonLfEncoder> list
(Function<T, JsonLfEncoder> itemEncoder) static JsonLfEncoder
numeric
(BigDecimal value) static <T> Function<Optional<T>,
JsonLfEncoder> optional
(Function<T, JsonLfEncoder> valueEncoder) static <T> Function<Optional<Optional<T>>,
JsonLfEncoder> optionalNested
(Function<Optional<T>, JsonLfEncoder> valueEncoder) static JsonLfEncoder
static JsonLfEncoder
record
(JsonLfEncoders.Field... fields) static JsonLfEncoder
static <T> Function<Map<String,
T>, JsonLfEncoder> textMap
(Function<T, JsonLfEncoder> valueEncoder) static JsonLfEncoder
static JsonLfEncoder
static <T> Function<T,
JsonLfEncoder> variant
(Function<T, JsonLfEncoders.Field> getField)
-
Constructor Details
-
JsonLfEncoders
public JsonLfEncoders()
-
-
Method Details
-
unit
-
bool
-
int64
-
text
-
numeric
-
timestamp
-
date
-
party
-
contractId
-
enumeration
public static <E extends DamlEnum<E>> Function<E,JsonLfEncoder> enumeration(Function<E, String> toDamlName) -
list
-
textMap
public static <T> Function<Map<String,T>, textMapJsonLfEncoder> (Function<T, JsonLfEncoder> valueEncoder) -
genMap
public static <K,V> Function<Map<K,V>, genMapJsonLfEncoder> (Function<K, JsonLfEncoder> keyEncoder, Function<V, JsonLfEncoder> valueEncoder) -
optional
public static <T> Function<Optional<T>,JsonLfEncoder> optional(Function<T, JsonLfEncoder> valueEncoder) -
optionalNested
public static <T> Function<Optional<Optional<T>>,JsonLfEncoder> optionalNested(Function<Optional<T>, JsonLfEncoder> valueEncoder) -
variant
-
record
-
apply
-