test_class.declarator: logger = LoggerFactory.getLogger(JsonUtilsTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(JsonUtilsTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: karate-core/src/test/java/com/intuit/karate/JsonUtilsTest.java
test_class.identifier: JsonUtilsTest
test_case.body: @Test
      public void testMalformed() {
          String text = FileUtils.toString(getClass().getResourceAsStream("malformed.txt"));
          try {
              Object o = JsonUtils.toJsonDocStrict(text);
              fail("we should not have reached here");
          } catch (Exception e) {
              assertTrue(e.getCause() instanceof ParseException);
          }
      }
test_case.class_method_signature: JsonUtilsTest.testMalformed()
test_case.full_signature: @Test public void testMalformed()
test_case.identifier: testMalformed
test_case.invocations: toString getResourceAsStream getClass toJsonDocStrict fail assertTrue getCause
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMalformed()
focal_class.file: karate-core/src/main/java/com/intuit/karate/JsonUtils.java
focal_class.identifier: JsonUtils
focal_class.class_method_signature: JsonUtils.JsonUtils()
focal_class.full_signature: private  JsonUtils()
focal_class.identifier: JsonUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  JsonUtils()
focal_class.class_method_signature: JsonUtils.toJsonDocStrict(String raw)
focal_class.full_signature: public static DocumentContext toJsonDocStrict(String raw)
focal_class.identifier: toJsonDocStrict
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext toJsonDocStrict(String raw)
focal_class.class_method_signature: JsonUtils.toJsonDoc(String raw)
focal_class.full_signature: public static DocumentContext toJsonDoc(String raw)
focal_class.identifier: toJsonDoc
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext toJsonDoc(String raw)
focal_class.class_method_signature: JsonUtils.toStrictJsonString(String raw)
focal_class.full_signature: public static String toStrictJsonString(String raw)
focal_class.identifier: toStrictJsonString
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: String
focal_class.signature: String toStrictJsonString(String raw)
focal_class.class_method_signature: JsonUtils.toJson(Object o)
focal_class.full_signature: public static String toJson(Object o)
focal_class.identifier: toJson
focal_class.modifiers: public static
focal_class.parameters: (Object o)
focal_class.return: String
focal_class.signature: String toJson(Object o)
focal_class.class_method_signature: JsonUtils.removeCyclicReferences(Map map)
focal_class.full_signature: public static Map removeCyclicReferences(Map map)
focal_class.identifier: removeCyclicReferences
focal_class.modifiers: public static
focal_class.parameters: (Map map)
focal_class.return: Map
focal_class.signature: Map removeCyclicReferences(Map map)
focal_class.class_method_signature: JsonUtils.recurseCyclic(int depth, Object o, Set<Object> seen)
focal_class.full_signature: private static boolean recurseCyclic(int depth, Object o, Set<Object> seen)
focal_class.identifier: recurseCyclic
focal_class.modifiers: private static
focal_class.parameters: (int depth, Object o, Set<Object> seen)
focal_class.return: boolean
focal_class.signature: boolean recurseCyclic(int depth, Object o, Set<Object> seen)
focal_class.class_method_signature: JsonUtils.toJsonDoc(Object o)
focal_class.full_signature: public static DocumentContext toJsonDoc(Object o)
focal_class.identifier: toJsonDoc
focal_class.modifiers: public static
focal_class.parameters: (Object o)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext toJsonDoc(Object o)
focal_class.class_method_signature: JsonUtils.fromJson(String s, String className)
focal_class.full_signature: public static Object fromJson(String s, String className)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (String s, String className)
focal_class.return: Object
focal_class.signature: Object fromJson(String s, String className)
focal_class.class_method_signature: JsonUtils.fromJson(String s, Class<T> clazz)
focal_class.full_signature: public static T fromJson(String s, Class<T> clazz)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (String s, Class<T> clazz)
focal_class.return: T
focal_class.signature: T fromJson(String s, Class<T> clazz)
focal_class.class_method_signature: JsonUtils.toPrettyJsonString(DocumentContext doc)
focal_class.full_signature: public static String toPrettyJsonString(DocumentContext doc)
focal_class.identifier: toPrettyJsonString
focal_class.modifiers: public static
focal_class.parameters: (DocumentContext doc)
focal_class.return: String
focal_class.signature: String toPrettyJsonString(DocumentContext doc)
focal_class.class_method_signature: JsonUtils.pad(StringBuilder sb, int depth)
focal_class.full_signature: private static void pad(StringBuilder sb, int depth)
focal_class.identifier: pad
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder sb, int depth)
focal_class.return: void
focal_class.signature: void pad(StringBuilder sb, int depth)
focal_class.class_method_signature: JsonUtils.ref(StringBuilder sb, Object o)
focal_class.full_signature: private static void ref(StringBuilder sb, Object o)
focal_class.identifier: ref
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder sb, Object o)
focal_class.return: void
focal_class.signature: void ref(StringBuilder sb, Object o)
focal_class.class_method_signature: JsonUtils.escapeValue(String raw)
focal_class.full_signature: public static String escapeValue(String raw)
focal_class.identifier: escapeValue
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: String
focal_class.signature: String escapeValue(String raw)
focal_class.class_method_signature: JsonUtils.nashornObjectToJavaJSON(Object jsObj)
focal_class.full_signature: public static Object nashornObjectToJavaJSON(Object jsObj)
focal_class.identifier: nashornObjectToJavaJSON
focal_class.modifiers: public static
focal_class.parameters: (Object jsObj)
focal_class.return: Object
focal_class.signature: Object nashornObjectToJavaJSON(Object jsObj)
focal_class.class_method_signature: JsonUtils.removeKeysWithNullValues(Object o)
focal_class.full_signature: public static void removeKeysWithNullValues(Object o)
focal_class.identifier: removeKeysWithNullValues
focal_class.modifiers: public static
focal_class.parameters: (Object o)
focal_class.return: void
focal_class.signature: void removeKeysWithNullValues(Object o)
focal_class.class_method_signature: JsonUtils.recursePretty(Object o, StringBuilder sb, int depth, Set<Object> seen)
focal_class.full_signature: private static void recursePretty(Object o, StringBuilder sb, int depth, Set<Object> seen)
focal_class.identifier: recursePretty
focal_class.modifiers: private static
focal_class.parameters: (Object o, StringBuilder sb, int depth, Set<Object> seen)
focal_class.return: void
focal_class.signature: void recursePretty(Object o, StringBuilder sb, int depth, Set<Object> seen)
focal_class.class_method_signature: JsonUtils.getParentAndLeafPath(String path)
focal_class.full_signature: public static StringUtils.Pair getParentAndLeafPath(String path)
focal_class.identifier: getParentAndLeafPath
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: StringUtils.Pair
focal_class.signature: StringUtils.Pair getParentAndLeafPath(String path)
focal_class.class_method_signature: JsonUtils.removeValueByPath(DocumentContext doc, String path)
focal_class.full_signature: public static void removeValueByPath(DocumentContext doc, String path)
focal_class.identifier: removeValueByPath
focal_class.modifiers: public static
focal_class.parameters: (DocumentContext doc, String path)
focal_class.return: void
focal_class.signature: void removeValueByPath(DocumentContext doc, String path)
focal_class.class_method_signature: JsonUtils.setValueByPath(DocumentContext doc, String path, Object value)
focal_class.full_signature: public static void setValueByPath(DocumentContext doc, String path, Object value)
focal_class.identifier: setValueByPath
focal_class.modifiers: public static
focal_class.parameters: (DocumentContext doc, String path, Object value)
focal_class.return: void
focal_class.signature: void setValueByPath(DocumentContext doc, String path, Object value)
focal_class.class_method_signature: JsonUtils.setValueByPath(DocumentContext doc, String path, Object value, boolean remove)
focal_class.full_signature: public static void setValueByPath(DocumentContext doc, String path, Object value, boolean remove)
focal_class.identifier: setValueByPath
focal_class.modifiers: public static
focal_class.parameters: (DocumentContext doc, String path, Object value, boolean remove)
focal_class.return: void
focal_class.signature: void setValueByPath(DocumentContext doc, String path, Object value, boolean remove)
focal_class.class_method_signature: JsonUtils.createParents(DocumentContext doc, String path)
focal_class.full_signature: private static void createParents(DocumentContext doc, String path)
focal_class.identifier: createParents
focal_class.modifiers: private static
focal_class.parameters: (DocumentContext doc, String path)
focal_class.return: void
focal_class.signature: void createParents(DocumentContext doc, String path)
focal_class.class_method_signature: JsonUtils.pathExists(DocumentContext doc, String path)
focal_class.full_signature: public static boolean pathExists(DocumentContext doc, String path)
focal_class.identifier: pathExists
focal_class.modifiers: public static
focal_class.parameters: (DocumentContext doc, String path)
focal_class.return: boolean
focal_class.signature: boolean pathExists(DocumentContext doc, String path)
focal_class.class_method_signature: JsonUtils.fromYaml(String raw)
focal_class.full_signature: public static DocumentContext fromYaml(String raw)
focal_class.identifier: fromYaml
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext fromYaml(String raw)
focal_class.class_method_signature: JsonUtils.fromCsv(String raw)
focal_class.full_signature: public static DocumentContext fromCsv(String raw)
focal_class.identifier: fromCsv
focal_class.modifiers: public static
focal_class.parameters: (String raw)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext fromCsv(String raw)
focal_class.class_method_signature: JsonUtils.toCsv(List<Map<String, Object>> list)
focal_class.full_signature: public static String toCsv(List<Map<String, Object>> list)
focal_class.identifier: toCsv
focal_class.modifiers: public static
focal_class.parameters: (List<Map<String, Object>> list)
focal_class.return: String
focal_class.signature: String toCsv(List<Map<String, Object>> list)
focal_class.class_method_signature: JsonUtils.buildPath(String parentPath, String key)
focal_class.full_signature: public static String buildPath(String parentPath, String key)
focal_class.identifier: buildPath
focal_class.modifiers: public static
focal_class.parameters: (String parentPath, String key)
focal_class.return: String
focal_class.signature: String buildPath(String parentPath, String key)
focal_class.class_method_signature: JsonUtils.emptyJsonObject()
focal_class.full_signature: public static DocumentContext emptyJsonObject()
focal_class.identifier: emptyJsonObject
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: DocumentContext
focal_class.signature: DocumentContext emptyJsonObject()
focal_class.class_method_signature: JsonUtils.emptyJsonArray(int length)
focal_class.full_signature: public static DocumentContext emptyJsonArray(int length)
focal_class.identifier: emptyJsonArray
focal_class.modifiers: public static
focal_class.parameters: (int length)
focal_class.return: DocumentContext
focal_class.signature: DocumentContext emptyJsonArray(int length)
focal_method.body: public static DocumentContext toJsonDocStrict(String raw) {
          try {
              JSONParser parser = new JSONParser(JSONParser.MODE_RFC4627);
              Object o = parser.parse(raw.trim());
              return JsonPath.parse(o);
          } catch (ParseException e) {
              throw new RuntimeException(e);
          }
      }
focal_method.class_method_signature: JsonUtils.toJsonDocStrict(String raw)
focal_method.full_signature: public static DocumentContext toJsonDocStrict(String raw)
focal_method.identifier: toJsonDocStrict
focal_method.invocations: parse trim parse
focal_method.modifiers: public static
focal_method.parameters: (String raw)
focal_method.return: DocumentContext
focal_method.signature: DocumentContext toJsonDocStrict(String raw)