org.javers.core.json.typeadapter.commit.JsonElementFakeAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
package org.javers.core.json.typeadapter.commit;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonSerializationContext;
import org.javers.core.json.JsonTypeAdapterTemplate;
/**
* @author bartosz walacik
*/
class JsonElementFakeAdapter extends JsonTypeAdapterTemplate {
@Override
public Class getValueType() {
return JsonElement.class;
}
@Override
public JsonElement fromJson(JsonElement json, JsonDeserializationContext jsonDeserializationContext) {
return json;
}
@Override
public JsonElement toJson(JsonElement sourceValue, JsonSerializationContext jsonSerializationContext) {
throw new UnsupportedOperationException();
}
}