@Test public void v_double_int() throws Exception { JsonFormat<Data> format = builder((r, d) -> d.object = r.readDouble(), (w, d) -> w.writeInt(d.intValue)) .build(); byte[] written = write(format, (data, v) -> data.intValue = v, 100); assertThat(read(format, written), contains(100d)); }
public static <T> Builder<T> builder(Class<T> dataType) { return new Builder<>(dataType); }
JsonFormat { public static <T> Builder<T> builder(Class<T> dataType) { return new Builder<>(dataType); } }
JsonFormat { public static <T> Builder<T> builder(Class<T> dataType) { return new Builder<>(dataType); } protected  JsonFormat(Builder<T> builder); }
JsonFormat { public static <T> Builder<T> builder(Class<T> dataType) { return new Builder<>(dataType); } protected  JsonFormat(Builder<T> builder); static Builder<T> builder(Class<T> dataType); JsonInput<T> open(
            String path, InputStream input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, OutputStream output, Collection<? extends OutputOption> options); JsonInput<T> open(
            String path, Reader input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, Writer output, Collection<? extends OutputOption> options); }
JsonFormat { public static <T> Builder<T> builder(Class<T> dataType) { return new Builder<>(dataType); } protected  JsonFormat(Builder<T> builder); static Builder<T> builder(Class<T> dataType); JsonInput<T> open(
            String path, InputStream input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, OutputStream output, Collection<? extends OutputOption> options); JsonInput<T> open(
            String path, Reader input, Collection<? extends InputOption> options); JsonOutput<T> open(
            String path, Writer output, Collection<? extends OutputOption> options); static final JsonFactory DEFAULT_JSON_FACTORY; static final Charset DEFAULT_CHARSET; static final LineSeparator DEFAULT_LINE_SEPARATOR; static final boolean DEFAULT_USE_PLAIN_DECIMAL; static final boolean DEFAULT_ESCAPE_NO_ASCII_CHARACTER; static final ErrorAction DEFAULT_ON_UNKNOWN_INPUT; static final Set<InputOption> DEFAULT_INPUT_OPTIONS; static final Set<OutputOption> DEFAULT_OUTPUT_OPTIONS; }