public class GsonValueMapper extends Object implements ValueMapper, InputFieldDiscoveryStrategy
TYPE_METADATA_FIELD_NAME| Constructor and Description |
|---|
GsonValueMapper(com.google.gson.Gson gson) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
fromInput(Object graphQlInput,
Type sourceType,
AnnotatedType outputType) |
<T> T |
fromString(String json,
AnnotatedType outputType) |
Set<InputField> |
getInputFields(AnnotatedType type)
Unlike Jackson, Gson doesn't expose any of its metadata, so this method is more or less a
reimplementation of
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory#getBoundFields(Gson, com.google.gson.reflect.TypeToken, Class) |
String |
toString(Object output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromInputpublic <T> T fromInput(Object graphQlInput, Type sourceType, AnnotatedType outputType)
fromInput in interface ValueMapperpublic <T> T fromString(String json, AnnotatedType outputType)
fromString in interface ValueMapperpublic String toString(Object output)
toString in interface ValueMapperpublic Set<InputField> getInputFields(AnnotatedType type)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory#getBoundFields(Gson, com.google.gson.reflect.TypeToken, Class)getInputFields in interface InputFieldDiscoveryStrategytype - Java type (used as query input) to be analyzed for deserializable fieldsAnnotatedTypeCopyright © 2016–2017. All rights reserved.