@Test public void testMessage() throws IOException { assertThat(parse("providence", "OptionalFields", "{\n" + " 'byteValue': 44\n" + " \"compactValue\": {\n" + " \"name\": 'name',\n" + " 'id': 42\n" + " }\n" + "}"), is(OptionalFields.builder() .setByteValue((byte) 44) .setCompactValue(new CompactFields("name", 42, null)) .build())); assertThat(parse("providence", "OptionalFields", "{\n" + " # shell comment\n" + " 'byteValue': calculator.foo\n" + " \n" + " \"compactValue\": {\n" + " " \"name\": 'name',\n" + " 'id': 42\n" + " }\n" + "}"), is(OptionalFields.builder() .setByteValue((byte) 44) .setCompactValue(new CompactFields("name", 42, null)) .build())); assertThat(parse("providence", "OptionalFields", "{}"), is(OptionalFields.builder().build())); }
public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type);  }