Class JsonUtils

java.lang.Object
com.amazonaws.xray.utils.JsonUtils

@Deprecated
public class JsonUtils
extends java.lang.Object
Deprecated.
For internal use only.
  • Constructor Summary

    Constructors 
    Constructor Description
    JsonUtils()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    static java.util.List<java.lang.String> getMatchingListFromJsonArrayNode​(com.fasterxml.jackson.databind.JsonNode rootNode, java.lang.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​(java.lang.String filePath, java.lang.String fieldName)
    Deprecated.
    Parses given file for an array field and returns that array as a JSON node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getNodeFromJsonFile

      public static com.fasterxml.jackson.databind.JsonNode getNodeFromJsonFile​(java.lang.String filePath, java.lang.String fieldName) throws java.io.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:
      java.io.IOException
    • getMatchingListFromJsonArrayNode

      public static java.util.List<java.lang.String> getMatchingListFromJsonArrayNode​(com.fasterxml.jackson.databind.JsonNode rootNode, java.lang.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.