mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-07 10:03:35 +00:00
@@ -15,6 +15,10 @@ public class JsonUtils {
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
}
|
||||
|
||||
public static <T> T fromJson(byte[] serialized, Class<T> clazz) throws IOException {
|
||||
return fromJson(new String(serialized), clazz);
|
||||
}
|
||||
|
||||
public static <T> T fromJson(String serialized, Class<T> clazz) throws IOException {
|
||||
return objectMapper.readValue(serialized, clazz);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user