Example usage for com.google.gson Gson fieldNamingStrategy

List of usage examples for com.google.gson Gson fieldNamingStrategy

Introduction

In this page you can find the example usage for com.google.gson Gson fieldNamingStrategy.

Prototype

FieldNamingStrategy fieldNamingStrategy

To view the source code for com.google.gson Gson fieldNamingStrategy.

Click Source Link

Usage

From source file:org.lastaflute.core.json.engine.GsonJsonEngine.java

License:Apache License

protected LaReflectiveTypeAdapterFactory createReflectiveTypeAdapterFactory(Gson newGson, Object factory) {
    final ConstructorConstructor constructorConstructor = getConstructorConstructor(factory);
    final JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory = getJsonAdapterFactory(factory);
    final FieldNamingStrategy fieldNamingStrategy = newGson.fieldNamingStrategy();
    final Excluder excluder = newGson.excluder();
    return new LaReflectiveTypeAdapterFactory(constructorConstructor, fieldNamingStrategy, excluder,
            jsonAdapterFactory);/*from ww w  .j  a v a2 s  . co  m*/
}