Class JsonReader.FieldMapping

  • Enclosing class:
    JsonReader<T>

    public static final class JsonReader.FieldMapping
    extends java.lang.Object
    If you're implementing a JsonReader for a JSON object, you can use this to map field names to a number you can switch on to efficiently locate assign a field.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.HashMap<java.lang.String,​java.lang.Integer> fields  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get​(java.lang.String fieldName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fields

        public final java.util.HashMap<java.lang.String,​java.lang.Integer> fields
    • Method Detail

      • get

        public int get​(java.lang.String fieldName)