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 occurred to allow all ref to be resolved.

Used in conjunction with ReadOptions.getMissingFieldHandler().

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fieldMissing(Object object, String fieldName, Object value)
    Notify that a field is missing.
  • Method Details

    • 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