Class ComponentDeserializer
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<XmlComponent>
io.github.toberocat.guiengine.xml.ComponentDeserializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class ComponentDeserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<XmlComponent>
Custom JSON deserializer for
XmlComponent
.
This class is responsible for deserializing JSON data into a XmlComponent
object.
It overrides the JsonDeserializer.deserialize(JsonParser, DeserializationContext)
method.
The expected JSON structure for deserialization should include "type", "priority", and "id" fields,
along with any other custom fields that represent data for the specific XmlComponent.
Created: 04/02/2023 Author: Tobias Madlberger (Tobias)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull XmlComponent
deserialize
(@NotNull com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) Deserialize JSON data into aXmlComponent
object.Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
ComponentDeserializer
public ComponentDeserializer()
-
-
Method Details
-
deserialize
@NotNull public @NotNull XmlComponent deserialize(@NotNull @NotNull com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException Deserialize JSON data into aXmlComponent
object. The JSON data should include type, priority, and id fields, along with any other custom fields that represent data for the specific XmlComponent.- Specified by:
deserialize
in classcom.fasterxml.jackson.databind.JsonDeserializer<XmlComponent>
- Parameters:
p
- TheJsonParser
to read the JSON data from.ctxt
- TheDeserializationContext
to use during deserialization.- Returns:
- A
XmlComponent
object created from the JSON data. - Throws:
IOException
- If an I/O error occurs during JSON parsing.
-