Package org.neo4j.smack.serialization

Examples of org.neo4j.smack.serialization.JsonDeserializer.readMap()


    public void testReadingMap() throws Exception {
        InputStream in = new ByteArrayInputStream("{\"firstkey\":1,\"secondkey\":2}".getBytes("UTF-8"));
       
        JsonDeserializer d = new JsonDeserializer(new JsonFactory(new ObjectMapper()), in);
       
        Map<String,Object> deserialized = d.readMap();
       
        assertThat(deserialized.containsKey("firstkey"), is(true));
        assertThat(deserialized.containsKey("secondkey"), is(true));
       
        assertThat((Integer)deserialized.get("firstkey"), is(1));
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.