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