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 Details

    • JsonUtility

      public JsonUtility()
  • Method Details

    • 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 a JsonNode.
      Parameters:
      json - The JSON string.
      Returns:
      The parsed JsonNode, or null if 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.