@Test void testSpecExample() throws Exception { InputStream is = this.getClass().getResourceAsStream("/net/consensys/cava/toml/toml-v0.5.0-spec-example.toml"); assertNotNull(is); TomlParseResult result = Toml.parse(is, TomlVersion.V0_4_0); assertFalse(result.hasErrors(), () -> joinErrors(result)); assertEquals("Tom Preston-Werner", result.getString("owner.name")); assertEquals(OffsetDateTime.parse("1979-05-27T07:32:00-08:00"), result.getOffsetDateTime("owner.dob")); assertEquals("10.0.0.2", result.getString("servers.beta.ip")); TomlArray clientHosts = result.getArray("clients.hosts"); assertNotNull(clientHosts); assertTrue(clientHosts.containsStrings()); assertEquals(Arrays.asList("alpha", "omega"), clientHosts.toList()); }
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);  }