Package com.amazonaws.xray.utils
Class JsonUtils
java.lang.Object
com.amazonaws.xray.utils.JsonUtils
Deprecated.
For internal use only.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMatchingListFromJsonArrayNode
(com.fasterxml.jackson.databind.JsonNode rootNode, String fieldName) Deprecated.Finds all immediate children entries mapped to a given field name in a JSON object.static com.fasterxml.jackson.databind.JsonNode
getNodeFromJsonFile
(String filePath, String fieldName) Deprecated.Parses given file for an array field and returns that array as a JSON node.
-
Constructor Details
-
JsonUtils
public JsonUtils()Deprecated.
-
-
Method Details
-
getNodeFromJsonFile
public static com.fasterxml.jackson.databind.JsonNode getNodeFromJsonFile(String filePath, String fieldName) throws IOException Deprecated.Parses given file for an array field and returns that array as a JSON node.- Parameters:
filePath
- - The path to the JSON file to parse.fieldName
- - The name of the field in the JSON document to retrieve. Must be a field pointing to an array.- Returns:
- A node containing an array object, or null if the field cannot be found.
- Throws:
IOException
-
getMatchingListFromJsonArrayNode
public static List<String> getMatchingListFromJsonArrayNode(com.fasterxml.jackson.databind.JsonNode rootNode, String fieldName) Deprecated.Finds all immediate children entries mapped to a given field name in a JSON object.- Parameters:
rootNode
- - The node to search for entries. Must be an array node.fieldName
- - The name of the key to search for in rootNode's children.- Returns:
- A list of values that were mapped to the given field name.
-