Ejemplo n.º 1
0
 /**
  * Configures Gson to apply a specific naming policy to an object's field during serialization and
  * deserialization.
  *
  * @param namingConvention the JSON field naming convention to use for serialization and
  *     deserialization.
  * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
  */
 public GsonBuilder setFieldNamingPolicy(FieldNamingPolicy namingConvention) {
   return setFieldNamingStrategy(namingConvention.getFieldNamingPolicy());
 }
Ejemplo n.º 2
0
 public final String translateName(Field field)
 {
     return FieldNamingPolicy.access$100(FieldNamingPolicy.access$200(field.getName(), " "));
 }