BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(csb.getOutputStream(), "UTF-8"));
JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
jsonStreamWriter.beginObject();
jsonStreamWriter.name(parts.get(0).getName().toLowerCase(Locale.ROOT));
parts.get(0).appendJson(jsonStreamWriter);
jsonStreamWriter.separator();
jsonStreamWriter.name(parts.get(1).getName().toLowerCase(Locale.ROOT));
parts.get(1).appendJson(jsonStreamWriter);
if (parts.size() > 2) {
jsonStreamWriter.separator();
jsonStreamWriter.name("server")