Package com.github.jsonj

Examples of com.github.jsonj.JsonObject.serialize()


    }

    public void shouldUseOutputStream() throws IOException {
        JsonObject object = object(field("hi", "wrld"));
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        object.serialize(bos);
        byte[] string = bos.toByteArray();
        assertThat(string.length, Matchers.greaterThan(0));
        assertThat(jsonParser.parse(bos.toString()), is(object));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.