Class IndividualAddressJsonDeserializer

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>

    public final class IndividualAddressJsonDeserializer
    extends AbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
    De-Serializes a JSON format of group address to an instance of IndividualAddress

    Supported JSON formats:

     {"type":0,"raw":[-61,45]}
     [-61,45]
     "12.3.45"
     
    • Method Detail

      • convert

        protected li.pitschmann.knx.core.address.IndividualAddress convert​(byte[] addressArray)
        Description copied from class: AbstractKnxAddressJsonDeserializer
        Creates a new instance of KnxAddress from given address byte array
        Specified by:
        convert in class AbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
        Parameters:
        addressArray - byte array to be converted to KnxAddress
        Returns:
        an instance of KnxAddress (Individual or Group Address)
      • convert

        protected li.pitschmann.knx.core.address.IndividualAddress convert​(String address)
        Description copied from class: AbstractKnxAddressJsonDeserializer
        Creates a new instance of KnxAddress from given String
        Specified by:
        convert in class AbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
        Parameters:
        address - address to be converted to KnxAddress
        Returns:
        address instance of KnxAddress (Individual or Group Address)