org.springframework.social.partnercenter.serialization.Json Maven / Gradle / Ivy
package org.springframework.social.partnercenter.serialization;
public class Json {
private static JsonConverter jsonConverter;
static {
jsonConverter = new JsonConverter();
}
public static JsonConverter instance(){
return new JsonConverter();
}
public static JsonConverter instance(JsonSerializationSettings serializationSettings){
return new JsonConverter(serializationSettings);
}
public static T fromJson(String jsonString, Class targetClass){
return jsonConverter.fromJson(jsonString, targetClass);
}
public static T fromJson(String jsonString, Class targetClass, JsonSerializationSettings serializationSettings){
return jsonConverter.fromJson(jsonString, targetClass, serializationSettings);
}
public static String toJson(T objectToSerialize){
return jsonConverter.toJson(objectToSerialize);
}
public static String toJson(T objectToSerialize, JsonSerializationSettings serializationSettings){
return jsonConverter.toJson(objectToSerialize, serializationSettings);
}
public static void configure(JsonSerializationSettings serializationSettings) {
jsonConverter.configure(serializationSettings);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy