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

redis.clients.jedis.json.JsonObjectMapper Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis.json;

/**
 * Represents the ability of serialize an object to JSON format string and deserialize it to the
 * typed object.
 * @see DefaultGsonObjectMapper Default implementation for JSON serializer/deserializer
 *     engine with com.google.gson.Gson
 */
public interface JsonObjectMapper {
  /**
   * Perform deserialization from JSON format string to the given type object as argument.
   * @param value     the JSON format
   * @param valueType the object type to convert
   * @param        the type object to convert
   * @return the instance of an object to the type given argument
   */
   T fromJson(String value, Class valueType);

  /**
   * Perform serialization from object to JSON format string.
   * @param value the object to convert
   * @return the JSON format string
   */
  String toJson(Object value);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy