类 OptimizedJsonInfo


  • public class OptimizedJsonInfo
    extends java.lang.Object
    This class keeps track of which Java classes and fields can be involved in Json (de)serialization and stores their corresponding Json field names and internal indices.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      java.util.Map<java.lang.String,​java.lang.Integer> classIndices
      Maps the class name to a unique, contiguous index.
      java.util.Map<java.lang.String,​OptimizedJsonInfo.ClassJsonInfo> classJsonInfos
      Maps the class name to a ClassJsonInfo.
      java.util.Map<java.lang.String,​java.lang.Integer> jsonFieldIndices
      Maps the json field name to a unique, contiguous index.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void assignIndices()
      Assigns indices to all registered classes and fields.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • classIndices

        public java.util.Map<java.lang.String,​java.lang.Integer> classIndices
        Maps the class name to a unique, contiguous index. This index is used to generate unique suffixes for the generated toJson and fromJson methods.
      • jsonFieldIndices

        public java.util.Map<java.lang.String,​java.lang.Integer> jsonFieldIndices
        Maps the json field name to a unique, contiguous index. This index is used to map Json field names to indices and backwards in the _OptimizedJsonReader and _OptimizedJsonWriter.
      • classJsonInfos

        public java.util.Map<java.lang.String,​OptimizedJsonInfo.ClassJsonInfo> classJsonInfos
        Maps the class name to a ClassJsonInfo. The ClassJsonInfo contains the names of all the exposed Java fields and their corresponding Json field name(s).
    • 构造器详细资料

      • OptimizedJsonInfo

        public OptimizedJsonInfo()
    • 方法详细资料

      • assignIndices

        public void assignIndices()
        Assigns indices to all registered classes and fields. The generated indices will be contiguous and starting from 0, both for classes and fields.