Package com.alibaba.fastjson

Examples of com.alibaba.fastjson.JSONReader.readLong()


        reader.startObject();

        int count = 0;
        while (reader.hasNext()) {
            String key = (String) reader.readObject();
            Long value = reader.readLong();
            count++;
        }
        Assert.assertEquals(10, count);

        reader.endObject();
View Full Code Here


        reader.startObject();

        int count = 0;
        while (reader.hasNext()) {
            String key = (String) reader.readObject();
            Long value = reader.readLong();
            count++;
        }
        Assert.assertEquals(10, count);

        reader.endObject();
View Full Code Here

    }

    public void test_long() throws Exception {
        JSONReader reader = new JSONReader(new StringReader("123"));

        Assert.assertEquals(new Long(123), reader.readLong());

        reader.close();
    }
}
View Full Code Here

        reader.startObject();
        Assert.assertEquals("val", reader.readString());

        reader.startObject();
        Assert.assertEquals("id", reader.readString());
        Assert.assertEquals(Long.valueOf(123), reader.readLong());
        reader.endObject();

        reader.endObject();
        reader.endObject();
View Full Code Here

        reader.startObject();

        int count = 0;
        while (reader.hasNext()) {
            String key = (String) reader.readObject();
            Long value = reader.readLong();
            count++;
        }
        Assert.assertEquals(10, count);

        reader.endObject();
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.