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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull XmlComponent
    deserialize(@NotNull com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)
    Deserialize JSON data into a XmlComponent 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a XmlComponent 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 class com.fasterxml.jackson.databind.JsonDeserializer<XmlComponent>
      Parameters:
      p - The JsonParser to read the JSON data from.
      ctxt - The DeserializationContext to use during deserialization.
      Returns:
      A XmlComponent object created from the JSON data.
      Throws:
      IOException - If an I/O error occurs during JSON parsing.