Examples of writeNumberField()


Examples of org.codehaus.jackson.util.TokenBuffer.writeNumberField()

        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);

        // Ok, first test JSON Object containing buffer:
        TokenBuffer buf = new TokenBuffer(mapper);
        buf.writeStartObject();
        buf.writeNumberField("num", 42);
        buf.writeEndObject();
        String json = mapper.writeValueAsString(new ObjectHolder(buf));
        ObjectHolder holder = mapper.readValue(json, ObjectHolder.class);
        assertNotNull(holder.value);
        assertSame(TokenBuffer.class, holder.value.getClass());
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.