Class JsonUtil

java.lang.Object
org.tribuo.json.JsonUtil

public final class JsonUtil extends Object
Utilities for interacting with JSON objects or text representations.
  • Method Details

    • convertToMap

      public static Map<String,String> convertToMap(com.fasterxml.jackson.databind.node.ObjectNode node)
      Converts a Json node into a Map from String to String for use in downstream processing by RowProcessor.

      This method ignores any fields which are not primitives (i.e., it ignores fields which are arrays and objects) as those are not supported by the columnar processing infrastructure.

      If the node is null it returns Collections#emptyMap.

      Parameters:
      node - The json object to convert.
      Returns:
      The map representing this json node.