@Test void testTomlV0_4_0Example() throws Exception { InputStream is = this.getClass().getResourceAsStream("/net/consensys/cava/toml/example-v0.4.0.toml"); assertNotNull(is); TomlParseResult result = Toml.parse(is, TomlVersion.V0_4_0); assertFalse(result.hasErrors(), () -> joinErrors(result)); assertEquals("value", result.getString("table.key")); assertEquals("Preston-Werner", result.getString("table.inline.name.last")); assertEquals("<\\i\\c*\\s*>", result.getString("string.literal.regex")); assertEquals(2L, result.getArray("array.key5").getLong(1)); assertEquals( "granny smith", result.getArray("fruit").getTable(0).getArray("variety").getTable(1).getString("name")); }
public static TomlParseResult parse(String input) { return parse(input, TomlVersion.LATEST); }
Toml { public static TomlParseResult parse(String input) { return parse(input, TomlVersion.LATEST); } }
Toml { public static TomlParseResult parse(String input) { return parse(input, TomlVersion.LATEST); } private  Toml(); }
Toml { public static TomlParseResult parse(String input) { return parse(input, TomlVersion.LATEST); } private  Toml(); static TomlParseResult parse(String input); static TomlParseResult parse(String input, TomlVersion version); static TomlParseResult parse(Path file); static TomlParseResult parse(Path file, TomlVersion version); static TomlParseResult parse(InputStream is); static TomlParseResult parse(InputStream is, TomlVersion version); static TomlParseResult parse(Reader reader); static TomlParseResult parse(Reader reader, TomlVersion version); static TomlParseResult parse(ReadableByteChannel channel); static TomlParseResult parse(ReadableByteChannel channel, TomlVersion version); static List<String> parseDottedKey(String dottedKey); static String joinKeyPath(List<String> path); static String canonicalDottedKey(String dottedKey); static StringBuilder tomlEscape(String text); }
Toml { public static TomlParseResult parse(String input) { return parse(input, TomlVersion.LATEST); } private  Toml(); static TomlParseResult parse(String input); static TomlParseResult parse(String input, TomlVersion version); static TomlParseResult parse(Path file); static TomlParseResult parse(Path file, TomlVersion version); static TomlParseResult parse(InputStream is); static TomlParseResult parse(InputStream is, TomlVersion version); static TomlParseResult parse(Reader reader); static TomlParseResult parse(Reader reader, TomlVersion version); static TomlParseResult parse(ReadableByteChannel channel); static TomlParseResult parse(ReadableByteChannel channel, TomlVersion version); static List<String> parseDottedKey(String dottedKey); static String joinKeyPath(List<String> path); static String canonicalDottedKey(String dottedKey); static StringBuilder tomlEscape(String text);  }