Enum RowJson.RowJsonDeserializer.NullBehavior

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RowJson.RowJsonDeserializer.NullBehavior>
    Enclosing class:
    RowJson.RowJsonDeserializer

    public static enum RowJson.RowJsonDeserializer.NullBehavior
    extends java.lang.Enum<RowJson.RowJsonDeserializer.NullBehavior>
    An enumeration type for specifying how RowJson.RowJsonDeserializer should expect null values to be represented.

    For example, when parsing JSON for the Schema (str: REQUIRED STRING, int: NULLABLE INT64):

    • If configured with REQUIRE_NULL, {"str": "foo", "int": null} would be accepted.
    • If configured with REQUIRE_MISSING, {"str": "bar"} would be accepted, and would yield a Row with null for the int field.
    • If configured with ALLOW_MISSING_OR_NULL, either JSON string would be accepted.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ACCEPT_MISSING_OR_NULL
      Specifies that a null value may be represented as either a missing field or a null value in the input JSON.
      REQUIRE_MISSING
      Specifies that a null value must be represented with a missing field in JSON.
      REQUIRE_NULL
      Specifies that a null value must be represented with a null value in JSON.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RowJson.RowJsonDeserializer.NullBehavior valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RowJson.RowJsonDeserializer.NullBehavior[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static RowJson.RowJsonDeserializer.NullBehavior[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RowJson.RowJsonDeserializer.NullBehavior c : RowJson.RowJsonDeserializer.NullBehavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RowJson.RowJsonDeserializer.NullBehavior valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null