use of com.alibaba.fastjson.serializer.ListSerializer in project fastjson by alibaba.
the class ListSerializerTest method test_6_s.
public void test_6_s() throws Exception {
SerializeWriter out = new SerializeWriter(SerializerFeature.BrowserCompatible);
ListSerializer listSerializer = new ListSerializer();
List<Object> list = new ArrayList<Object>();
list.add(1L);
list.add(1453964515792017682L);
listSerializer.write(new JSONSerializer(out), list, null, null, 0);
Assert.assertEquals("[1,\"1453964515792017682\"]", out.toString());
}
Aggregations