Class JsoniterAny

java.lang.Object
de.oktoflow.platform.support.json.jackson.JsoniterAny
All Implemented Interfaces:
de.iip_ecosphere.platform.support.json.JsonIterator

public class JsoniterAny extends Object implements de.iip_ecosphere.platform.support.json.JsonIterator
Wraps a Jsoniter into a JsonIterator. May need performance optimization, e.g., pooling.
Author:
Holger Eichelberger, SSE
  • Field Details

    • LAZY_ANY_CLS

      private static final Class<?> LAZY_ANY_CLS
    • LAZY_ANY_HEAD_FIELD

      private static final Field LAZY_ANY_HEAD_FIELD
    • LAZY_ANY_TAIL_FIELD

      private static final Field LAZY_ANY_TAIL_FIELD
    • IMPL_TYPE2TYPE

      private static final Map<com.jsoniter.ValueType,de.iip_ecosphere.platform.support.json.JsonIterator.ValueType> IMPL_TYPE2TYPE
    • any

      private com.jsoniter.any.Any any
  • Constructor Details

    • JsoniterAny

      JsoniterAny(com.jsoniter.any.Any any)
      Creates a wrapping instance.
      Parameters:
      any - the instance to wrap
  • Method Details

    • valueType

      public de.iip_ecosphere.platform.support.json.JsonIterator.ValueType valueType()
      Specified by:
      valueType in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • containsKey

      public boolean containsKey(String key)
      Specified by:
      containsKey in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • get

      public de.iip_ecosphere.platform.support.json.JsonIterator get(String key)
      Specified by:
      get in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • slice

      public byte[] slice(byte[] data, de.iip_ecosphere.platform.support.json.JsonIterator iter) throws IOException
      Specified by:
      slice in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • size

      public int size()
      Specified by:
      size in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • get

      public de.iip_ecosphere.platform.support.json.JsonIterator get(int index)
      Specified by:
      get in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • entries

      public de.iip_ecosphere.platform.support.json.JsonIterator.EntryIterator entries()
      Specified by:
      entries in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • getAnyKey

      public String getAnyKey()
      Specified by:
      getAnyKey in interface de.iip_ecosphere.platform.support.json.JsonIterator
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringValue

      public String toStringValue() throws IOException
      Specified by:
      toStringValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toDoubleValue

      public double toDoubleValue() throws IOException
      Specified by:
      toDoubleValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toFloatValue

      public float toFloatValue() throws IOException
      Specified by:
      toFloatValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toLongValue

      public long toLongValue() throws IOException
      Specified by:
      toLongValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toBooleanValue

      public boolean toBooleanValue() throws IOException
      Specified by:
      toBooleanValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toIntValue

      public int toIntValue() throws IOException
      Specified by:
      toIntValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toBigIntegerValue

      public BigInteger toBigIntegerValue() throws IOException
      Specified by:
      toBigIntegerValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • toBigDecimalValue

      public BigDecimal toBigDecimalValue() throws IOException
      Specified by:
      toBigDecimalValue in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • asMap

      public Map<String,Object> asMap() throws IOException
      Specified by:
      asMap in interface de.iip_ecosphere.platform.support.json.JsonIterator
      Throws:
      IOException
    • collectAll

      private void collectAll(String name, com.jsoniter.any.Any any, Map<String,Object> fields)
      Collects all (nested) entries for field name-any in result.
      Parameters:
      name - the name of the field
      any - the value of the field
      fields - the fields representing the parent of this field, to be modified as a side effect