Class JacksonUtils
java.lang.Object
org.photonvision.common.util.file.JacksonUtils
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
deserialize
(String s, Class<T> ref) static <T> T
deserialize
(Path path, Class<T> ref) static <T> T
deserialize
(Path path, Class<T> ref, com.fasterxml.jackson.databind.deser.std.StdDeserializer<T> deserializer) static <T> T
deserialize
(Map<?, ?> s, Class<T> ref) static <T> void
static <T> void
static <T> void
serialize
(Path path, T object, Class<T> ref, com.fasterxml.jackson.databind.ser.std.StdSerializer<T> serializer) static <T> void
serialize
(Path path, T object, Class<T> ref, com.fasterxml.jackson.databind.ser.std.StdSerializer<T> serializer, boolean forceSync) static <T> String
serializeToString
(T object)
-
Constructor Details
-
JacksonUtils
public JacksonUtils()
-
-
Method Details
-
serialize
- Throws:
IOException
-
serializeToString
- Throws:
IOException
-
serialize
- Throws:
IOException
-
deserialize
- Throws:
IOException
-
deserialize
- Throws:
IOException
-
deserialize
- Throws:
IOException
-
deserialize
public static <T> T deserialize(Path path, Class<T> ref, com.fasterxml.jackson.databind.deser.std.StdDeserializer<T> deserializer) throws IOException - Throws:
IOException
-
serialize
public static <T> void serialize(Path path, T object, Class<T> ref, com.fasterxml.jackson.databind.ser.std.StdSerializer<T> serializer) throws IOException - Throws:
IOException
-
serialize
public static <T> void serialize(Path path, T object, Class<T> ref, com.fasterxml.jackson.databind.ser.std.StdSerializer<T> serializer, boolean forceSync) throws IOException - Throws:
IOException
-