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().

Author:
John DeRegnaucourt ([email protected])
Copyright (c) Cedar Software LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

License

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • 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