
cl.transbank.util.JsonUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transbank-sdk-java Show documentation
Show all versions of transbank-sdk-java Show documentation
Tranbank API integration SDK for Java Projects
The newest version!
package cl.transbank.util;
import java.util.List;
/**
* This interface provides methods for JSON encoding and decoding.
*/
public interface JsonUtil {
/**
* Encodes an object into a JSON string.
* @param o The object to encode.
* @return The JSON string.
*/
String jsonEncode(Object o);
/**
* Decodes a JSON string into an object of the specified class.
* @param json The JSON string.
* @param clazz The class of the object.
* @param The type of the object.
* @return The decoded object.
*/
T jsonDecode(String json, Class clazz);
/**
* Decodes a JSON string into a list of objects of the specified class.
* @param json The JSON string.
* @param clazz The class of the objects.
* @param The type of the objects.
* @return The list of decoded objects.
*/
List jsonDecodeToList(String json, Class clazz);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy