@Test @DisplayName("$.* : root is list, objects are rows, nested maps") public void testListOfNestedObjects() { String json = "[{\"a\":1, \"b\":{\"x\":1, \"y\":2}},{\"a\":2, \"b\":{\"x\":3, \"y\":4}}]"; DataFrame df = Json.loader().load(json); Map<String, Object> expectedMap1 = new HashMap<>(); expectedMap1.put("x", 1); expectedMap1.put("y", 2); Map<String, Object> expectedMap2 = new HashMap<>(); expectedMap2.put("x", 3); expectedMap2.put("y", 4); new DataFrameAsserts(df, "a", "b") .expectHeight(2) .expectRow(0, 1, expectedMap1) .expectRow(1, 2, expectedMap2); }
public DataFrame load(String json) { DocumentContext context = JsonPath.parse(json, buildJSONPathConfiguration()); return load(context); }
JsonLoader { public DataFrame load(String json) { DocumentContext context = JsonPath.parse(json, buildJSONPathConfiguration()); return load(context); } }
JsonLoader { public DataFrame load(String json) { DocumentContext context = JsonPath.parse(json, buildJSONPathConfiguration()); return load(context); } JsonLoader(); }
JsonLoader { public DataFrame load(String json) { DocumentContext context = JsonPath.parse(json, buildJSONPathConfiguration()); return load(context); } JsonLoader(); JsonLoader pathExpression(String pathExpression); JsonLoader nullsForMissingLeafs(); DataFrame load(String json); DataFrame load(Reader reader); }
JsonLoader { public DataFrame load(String json) { DocumentContext context = JsonPath.parse(json, buildJSONPathConfiguration()); return load(context); } JsonLoader(); JsonLoader pathExpression(String pathExpression); JsonLoader nullsForMissingLeafs(); DataFrame load(String json); DataFrame load(Reader reader);  }