Exemplo n.º 1
0
 @Override
 protected void finishText(final byte[] value) throws IOException {
   print(',');
   indent();
   print('"');
   for (final byte ch : value) encode(ch);
   print('"');
 }
Exemplo n.º 2
0
 @Override
 protected void startOpen(final byte[] name) throws IOException {
   if (lvl != 0) {
     print(',');
     indent();
   }
   print("[\"");
   for (final byte ch : local(name)) encode(ch);
   print('"');
   att = false;
 }
Exemplo n.º 3
0
 @Override
 protected void attribute(final byte[] name, final byte[] value) throws IOException {
   print(",");
   if (indent) print(' ');
   if (!att) {
     print("{");
     att = true;
   }
   print('"');
   for (final byte ch : name) encode(ch);
   print("\":\"");
   for (final byte ch : value) encode(ch);
   print("\"");
 }
Exemplo n.º 4
0
 @Override
 protected void finishClose() throws IOException {
   print(']');
 }
Exemplo n.º 5
0
 @Override
 protected void finishEmpty() throws IOException {
   finishOpen();
   print(']');
 }
Exemplo n.º 6
0
 @Override
 protected void finishOpen() throws IOException {
   if (att) print("}");
 }