Class JSONTarget<R>

java.lang.Object
org.h2.util.json.JSONTarget<R>
Type Parameters:
R - the type of the result
Direct Known Subclasses:
JSONByteArrayTarget, JSONStringTarget, JSONValidationTarget, JSONValueTarget

public abstract class JSONTarget<R> extends Object
Abstract JSON output target.
  • Constructor Details

    • JSONTarget

      public JSONTarget()
  • Method Details

    • startObject

      public abstract void startObject()
      Start of an object.
    • endObject

      public abstract void endObject()
      End of the current object.
    • startArray

      public abstract void startArray()
      Start of an array.
    • endArray

      public abstract void endArray()
      End of the current array.
    • member

      public abstract void member(String name)
      Name of a member.
      Parameters:
      name - the name
    • valueNull

      public abstract void valueNull()
      Parse "null". null value.
    • valueFalse

      public abstract void valueFalse()
      Parse "false". false value.
    • valueTrue

      public abstract void valueTrue()
      Parse "true". true value.
    • valueNumber

      public abstract void valueNumber(BigDecimal number)
      A number value.
      Parameters:
      number - the number
    • valueString

      public abstract void valueString(String string)
      A string value.
      Parameters:
      string - the string
    • isPropertyExpected

      public abstract boolean isPropertyExpected()
      Returns whether member's name or the end of the current object is expected.
      Returns:
      true if it is, false otherwise
    • isValueSeparatorExpected

      public abstract boolean isValueSeparatorExpected()
      Returns whether value separator expected before the next member or value.
      Returns:
      true if it is, false otherwise
    • getResult

      public abstract R getResult()
      Returns the result.
      Returns:
      the result