Package org.tribuo.json
Class JsonUtil
java.lang.Object
org.tribuo.json.JsonUtil
Utilities for interacting with JSON objects or text representations.
-
Method Summary
Modifier and TypeMethodDescriptionconvertToMap
(com.fasterxml.jackson.databind.node.ObjectNode node) Converts a Json node into a Map from String to String for use in downstream processing byRowProcessor
.
-
Method Details
-
convertToMap
Converts a Json node into a Map from String to String for use in downstream processing byRowProcessor
.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.
-