Class SubscribedPowerDeserializer

java.lang.Object
tools.jackson.databind.ValueDeserializer<String>
energy.eddie.regionconnector.fr.enedis.dto.situation.SubscribedPowerDeserializer
All Implemented Interfaces:
tools.jackson.databind.deser.NullValueProvider

public class SubscribedPowerDeserializer extends tools.jackson.databind.ValueDeserializer<String>
Reads subscribed_power from situation_contrat_auto whether Enedis returns a bare scalar ("6") or the power object its Swagger defines ({"unit": "kW", "value": "6"}). In the object case the value is returned, which is the only part a downstream consumer can use as a quantity.
  • Nested Class Summary

    Nested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer

    tools.jackson.databind.ValueDeserializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctxt)
     

    Methods inherited from class tools.jackson.databind.ValueDeserializer

    createContextual, deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SubscribedPowerDeserializer

      public SubscribedPowerDeserializer()
  • Method Details

    • deserialize

      public @Nullable String deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctxt)
      Specified by:
      deserialize in class tools.jackson.databind.ValueDeserializer<String>