public class NullableJsonElementTypeAdapterFactory extends Object implements com.google.gson.TypeAdapterFactory
JsonElement and all of its subclasses as
null instead of JsonNull.INSTANCE.
Must only be used in combination with @JsonAdapter
on fields:
class MyClass {
@JsonAdapter(NullableJsonElementTypeAdapterFactory.class)
JsonElement f;
}
| Constructor and Description |
|---|
NullableJsonElementTypeAdapterFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T> com.google.gson.TypeAdapter<T> |
create(com.google.gson.Gson gson,
com.google.gson.reflect.TypeToken<T> type) |
Copyright © 2023. All rights reserved.