assertEquals("write " + type, json, getJSON(obj, true));
assertEquals("parse " + type, obj, parseJSON(json, true));
}
public void testClose() throws Exception {
JSONWriter writer = new JSONWriter(new OutputStreamWriter(new ByteArrayOutputStream()));
writer.close();
IOException caught = null;
try {
writer.write("");
} catch (IOException e) {
caught = e;
} finally {
assertNotNull("write after close", caught);
}