All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javers.core.json.typeadapter.commit.JsonElementFakeAdapter Maven / Gradle / Ivy

There is a newer version: 7.6.2
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy