Interface JsonReader.MissingFieldHandler

  • Enclosing class:
    JsonReader

    public static interface JsonReader.MissingFieldHandler
    Used to react to fields missing when reading an object. This method will be called after all deserialization has occured to allow all ref to be resolved.

    Used in conjunction with JsonReader.MISSING_FIELD_HANDLER.

    • Method Detail

      • fieldMissing

        void fieldMissing​(Object object,
                          String fieldName,
                          Object value)
        Notify that a field is missing.
        Warning : not every type can be deserialized upon missing fields. Arrays and Object type that do not have serialized @type definition will be ignored.
        Parameters:
        object - the object that contains the missing field
        fieldName - name of the field to be replaced
        value - current value of the field