Example #1
0
 @Override
 protected void finishText(final byte[] value) throws IOException {
   print(',');
   indent();
   print('"');
   for (final byte ch : value) encode(ch);
   print('"');
 }
Example #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;
 }
Example #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("\"");
 }
Example #4
0
 @Override
 protected void finishClose() throws IOException {
   print(']');
 }
Example #5
0
 @Override
 protected void finishEmpty() throws IOException {
   finishOpen();
   print(']');
 }
Example #6
0
 @Override
 protected void finishOpen() throws IOException {
   if (att) print("}");
 }