Package org.opensearch.client.json
Class ExternallyTaggedUnion.Deserializer<Union extends TaggedUnion<?,?>,Member>
- java.lang.Object
-
- org.opensearch.client.json.ExternallyTaggedUnion.Deserializer<Union,Member>
-
- Enclosing class:
- ExternallyTaggedUnion
public static class ExternallyTaggedUnion.Deserializer<Union extends TaggedUnion<?,?>,Member> extends java.lang.Object
A deserializer for externally-tagged unions. Since the union variant discriminant is provided externally, this cannot be a regularJsonpDeserializer
as the caller has to provide the discriminant value.
-
-
Constructor Summary
Constructors Constructor Description Deserializer(java.util.Map<java.lang.String,JsonpDeserializer<? extends Member>> deserializers, java.util.function.Function<Member,Union> unionCtor)
Deserializer(java.util.Map<java.lang.String,JsonpDeserializer<? extends Member>> deserializers, java.util.function.Function<Member,Union> unionCtor, java.util.function.BiFunction<java.lang.String,JsonData,Union> unKnownUnionCtor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Union
deserialize(java.lang.String type, jakarta.json.stream.JsonParser parser, JsonpMapper mapper, jakarta.json.stream.JsonParser.Event event)
ExternallyTaggedUnion.TypedKeysDeserializer<Union>
typedKeys()
Deserialize an externally tagged union encoded as typed keys, a JSON dictionary whose property names combine type and name in a single string.
-
-
-
Constructor Detail
-
Deserializer
public Deserializer(java.util.Map<java.lang.String,JsonpDeserializer<? extends Member>> deserializers, java.util.function.Function<Member,Union> unionCtor)
-
-
Method Detail
-
deserialize
public Union deserialize(java.lang.String type, jakarta.json.stream.JsonParser parser, JsonpMapper mapper, jakarta.json.stream.JsonParser.Event event)
-
typedKeys
public ExternallyTaggedUnion.TypedKeysDeserializer<Union> typedKeys()
Deserialize an externally tagged union encoded as typed keys, a JSON dictionary whose property names combine type and name in a single string.
-
-