Class JsonUtility
- java.lang.Object
-
- org.gcube.informationsystem.utils.JsonUtility
-
public class JsonUtility extends Object
A utility class for working with JSON.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description JsonUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.gcube.com.fasterxml.jackson.databind.JsonNodegetJsonNode(String json)Parses a JSON string into aJsonNode.
-
-
-
Method Detail
-
getJsonNode
public static org.gcube.com.fasterxml.jackson.databind.JsonNode getJsonNode(String json) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException, IOException
Parses a JSON string into aJsonNode.- Parameters:
json- The JSON string.- Returns:
- The parsed
JsonNode, ornullif the input is null or empty. - Throws:
IOException- if an I/O error occurs.org.gcube.com.fasterxml.jackson.core.JsonProcessingException- if a JSON processing error occurs.
-
-