mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:37:26 +00:00
Improvement
This commit is contained in:
@@ -51,6 +51,10 @@ public class JsonUtil {
|
||||
return objectMapper.readValue(serialized, clazz);
|
||||
}
|
||||
|
||||
public static <T> T fromJson(JsonNode serialized, Class<T> clazz) throws IOException {
|
||||
return objectMapper.treeToValue(serialized, clazz);
|
||||
}
|
||||
|
||||
public static JsonNode fromJson(String serialized) throws IOException {
|
||||
return objectMapper.readTree(serialized);
|
||||
}
|
||||
|
Reference in New Issue
Block a user