private static void serialize(final BufferedWriter bw, final JsonElement json, final boolean pretty, final int indent) throws IOException {
if(json==null) {
return;
}
JsonType type = json.type();
switch (type) {
case object:
bw.write('{');
newline(bw, indent+1, pretty);
Iterator<Entry<String, JsonElement>> iterator = json.asObject().entrySet().iterator();