private Gson createGson ( ) { GsonBuilder gsonBuilder = new GsonBuilder ( ) . disableHtmlEscaping ( ) . setLenient ( ) . addSerializationExclusionStrategy ( new ExclusionStrategy ( ) { @ Override public boolean shouldSkipField ( FieldAttributes f ) { return f . getAnnotation ( SerializedName . class ) == null ; } @ Override public boolean shouldSkipClass ( Class < ? > clazz ) { return false ; } } ) ; return gsonBuilder . create ( ) ; }
Create Gson converter for the service .