Examples of JsonWriter


Examples of org.sonar.api.utils.text.JsonWriter

      "{\"transitions\": []}");
  }

  private void testActions(Issue issue, String expected) throws JSONException {
    StringWriter output = new StringWriter();
    JsonWriter jsonWriter = JsonWriter.of(output);
    jsonWriter.beginObject();
    writer.writeActions(issue, jsonWriter);
    jsonWriter.endObject();
    JSONAssert.assertEquals(output.toString(), expected, true);
  }
View Full Code Here

Examples of org.spockframework.util.JsonWriter

    ByteArrayOutputStream messageBuffer = new ByteArrayOutputStream(1024);
    Writer messageWriter = null;
    try {
      messageWriter = new OutputStreamWriter(messageBuffer, "utf-8");
      JsonWriter jsonWriter = new JsonWriter(messageWriter);
      jsonWriter.write(log);
      messageWriter.write("\n");
    } catch (IOException e) {
      throw new InternalSpockError(e);
    } finally {
      IoUtil.closeQuietly(messageWriter);
View Full Code Here

Examples of voldemort.serialization.json.JsonWriter

        properties.putAll(jsonReader.readObject());
    }

    public String toJsonString() throws IOException {
        StringWriter stringWriter = new StringWriter();
        new JsonWriter(stringWriter).writeMap(properties);
        stringWriter.flush();
        return stringWriter.toString();
    }
View Full Code Here

Examples of voldemort.serialization.json.JsonWriter

    }

    public synchronized String toJsonString() {
        Map<String, Object> map = asMap();
        StringWriter writer = new StringWriter();
        new JsonWriter(writer).write(map);
        writer.flush();
        return writer.toString();
    }
View Full Code Here

Examples of voldemort.serialization.json.JsonWriter

        for(RebalanceTaskInfo rebalanceTaskInfo: stealInfoMap.values())
            maps.add(rebalanceTaskInfo.asMap());

        StringWriter stringWriter = new StringWriter();
        new JsonWriter(stringWriter).write(maps);
        stringWriter.flush();

        return stringWriter.toString();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.