Skip to content

Commit

Permalink
Added a method to JsonUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesJander committed Mar 5, 2021
1 parent cb08e00 commit 6e87b0d
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -108,7 +108,11 @@ public <T> T deserialize(String value, TypeReference<T> typeRef) {
throw new JsonParsingException(e);
}
}


public <T> T deserialize(JsonNode value, TypeReference<T> typeRef) {
return mapper.convertValue(value, typeRef);
}

public JsonNode readValue(String value) {
try {
return mapper.readTree(sanitize(value));
Expand Down

0 comments on commit 6e87b0d

Please sign in to comment.