多线程同时调用会有问题吧以下摘自Gson User Guide:Sometimes you need to share state across customserializers/deserializers (see this discussion). You can use thefollowing three strategies to accomplish this: 1.Store shared state in static fields2.Declare the serializer/deserializer as inner classes of a parent type, and use the instance fields of parent type to store shared state3.Use Java ThreadLocal 1 and 2 are not thread-safe options, but 3 is.