Class JsonUtils
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.utils.JsonUtils
-
public class JsonUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private static com.fasterxml.jackson.databind.ObjectMapperMAPPER
-
Constructor Summary
Constructors Constructor Description JsonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TdeepCopyWithJson(T source)static <T> TfromJson(String json, com.fasterxml.jackson.core.type.TypeReference<T> type)static <T> TfromJson(String json, Class<T> clazz)static <T> TreadFromJsonFile(File target, Class<T> clazz)static StringtoJson(Object src)static voidwriteToJsonFile(File targetFile, Object json)
-
-
-
Method Detail
-
deepCopyWithJson
public static <T> T deepCopyWithJson(T source)
-
writeToJsonFile
public static void writeToJsonFile(File targetFile, Object json) throws IOException
- Throws:
IOException
-
fromJson
public static <T> T fromJson(String json, com.fasterxml.jackson.core.type.TypeReference<T> type)
-
-