}
public void test_4() throws Exception {
StringWriter out = new StringWriter();
JSONWriter writer = new JSONWriter(out);
writer.writeStartArray();
writer.writeStartObject();
writer.writeEndObject();
writer.writeStartObject();
writer.writeEndObject();
writer.writeStartArray();
writer.writeEndArray();
{
writer.writeStartArray();
writer.writeStartArray();
writer.writeEndArray();
writer.writeStartArray();
writer.writeEndArray();
writer.writeEndArray();
writer.writeValue(1);
}
writer.writeEndArray();
writer.flush();
Assert.assertEquals("[{},{},[],[[],[]],1]", out.toString());
}