@Test public void simpleJsonTest() { String json = "[{'foo1':'bar1', 'foo2':'bar2'}, {'foo3':'bar3', 'foo4':'bar4'}]"; List<MapRecord> records = JsonRecords.parseAsMap(json); Assert.assertEquals(2, records.size()); Assert.assertEquals( new MapRecord(ImmutableMap.<Column,RecordValue<?>> of(Column.create("foo1"), RecordValue.create("bar1"), Column.create("foo2"), RecordValue.create("bar2")), "0", Defaults.EMPTY_VIS), records.get(0)); Assert.assertEquals( new MapRecord(ImmutableMap.<Column,RecordValue<?>> of(Column.create("foo3"), RecordValue.create("bar3"), Column.create("foo4"), RecordValue.create("bar4")), "1", Defaults.EMPTY_VIS), records.get(1)); }
public static List<MapRecord> parseAsMap(File jsonFile) throws FileNotFoundException, IOException, JsonSyntaxException { return parseAsMap(jsonFile, new CountingDocIdGenerator()); }
JsonRecords { public static List<MapRecord> parseAsMap(File jsonFile) throws FileNotFoundException, IOException, JsonSyntaxException { return parseAsMap(jsonFile, new CountingDocIdGenerator()); } }
JsonRecords { public static List<MapRecord> parseAsMap(File jsonFile) throws FileNotFoundException, IOException, JsonSyntaxException { return parseAsMap(jsonFile, new CountingDocIdGenerator()); }  }
JsonRecords { public static List<MapRecord> parseAsMap(File jsonFile) throws FileNotFoundException, IOException, JsonSyntaxException { return parseAsMap(jsonFile, new CountingDocIdGenerator()); }  static List<MapRecord> parseAsMap(File jsonFile); static List<MultimapRecord> parseAsMultimap(File jsonFile); static List<MapRecord> parseAsMap(File jsonFile, DocIdGenerator generator); static List<MultimapRecord> parseAsMultimap(File jsonFile, DocIdGenerator generator); static List<MapRecord> parseAsMap(String json); static List<MultimapRecord> parseAsMultimap(String json); static List<MapRecord> parseAsMap(String json, DocIdGenerator generator); static List<MultimapRecord> parseAsMultimap(String json, DocIdGenerator generator); }
JsonRecords { public static List<MapRecord> parseAsMap(File jsonFile) throws FileNotFoundException, IOException, JsonSyntaxException { return parseAsMap(jsonFile, new CountingDocIdGenerator()); }  static List<MapRecord> parseAsMap(File jsonFile); static List<MultimapRecord> parseAsMultimap(File jsonFile); static List<MapRecord> parseAsMap(File jsonFile, DocIdGenerator generator); static List<MultimapRecord> parseAsMultimap(File jsonFile, DocIdGenerator generator); static List<MapRecord> parseAsMap(String json); static List<MultimapRecord> parseAsMultimap(String json); static List<MapRecord> parseAsMap(String json, DocIdGenerator generator); static List<MultimapRecord> parseAsMultimap(String json, DocIdGenerator generator);  }