Package co.elastic.clients.json
Class JsonEnums.Deserializer<T extends JsonEnum>
java.lang.Object
co.elastic.clients.json.JsonpDeserializerBase<T>
co.elastic.clients.json.JsonEnums.Deserializer<T>
- All Implemented Interfaces:
- JsonpDeserializer<T>
- Direct Known Subclasses:
- JsonEnum.Deserializer
- Enclosing class:
- JsonEnums
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classAn enum deserializer that also accepts boolean values.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionDeserializer(T[] values) protectedDeserializer(T[] values, EnumSet<jakarta.json.stream.JsonParser.Event> acceptedEvents) 
- 
Method SummaryModifier and TypeMethodDescriptiondeserialize(jakarta.json.stream.JsonParser parser, JsonpMapper mapper, jakarta.json.stream.JsonParser.Event event) Deserialize a value.deserialize(String value, jakarta.json.stream.JsonParser parser) Get the enum member for a JSON string valueGet the enum member for a JSON string valueMethods inherited from class co.elastic.clients.json.JsonpDeserializerBaseacceptedEvents, accepts, allAcceptedEvents, nativeEventsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.json.JsonpDeserializerdeserialize
- 
Constructor Details- 
Deserializer
- 
Deserializer
 
- 
- 
Method Details- 
deserializepublic T deserialize(jakarta.json.stream.JsonParser parser, JsonpMapper mapper, jakarta.json.stream.JsonParser.Event event) Description copied from interface:JsonpDeserializerDeserialize a value. The value starts at the current state in the JSON stream.- Parameters:
- parser- the JSON parser
- mapper- the JSON-P mapper
- event- the current state of- parser, which must be part of- JsonpDeserializer.acceptedEvents()
- Returns:
- the parsed value
 
- 
deserializeGet the enum member for a JSON string value- Parameters:
- value- the JSON value
- parser- parsing context
- Returns:
- the enum member
- Throws:
- jakarta.json.stream.JsonParsingException- if no matching enum was found
 
- 
parseGet the enum member for a JSON string value- Parameters:
- value- the JSON value
- Returns:
- the enum member
- Throws:
- IllegalArgumentException- if no matching enum was found
 
 
-