public void writeJSONString(Writer out) throws IOException{ writeJSONString(this, out); }
JSONObject.writeJSONString((Map)value, out); return;
@Override public void writeToWriter(Object model, Writer writer) throws Exception { ((JSONObject)model).writeJSONString(writer); }
public void writeJSONString(Writer out) throws IOException{ writeJSONString(this, out); }
public static void encode(Map<String, Object> obj, Object output) throws IOException { Writer w = toWriter(output); JSONObject.writeJSONString(obj, w); w.flush(); } }
jsonObject.writeJSONString(response.getWriter());
JSONObject.writeJSONString((Map)value, out); return;
statisticsJSONObject.writeJSONString(writer);
conferenceJSONObject.writeJSONString(response.getWriter());
responseJSONObject.writeJSONString( response.getWriter());
responseJSONObject.writeJSONString( response.getWriter());
public void writeJSONString(Writer out) throws IOException{ writeJSONString(this, out); }
@Override public void writeTo(Map map, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> stringObjectMultivaluedMap, OutputStream outputStream) throws IOException, WebApplicationException { Writer writer = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8); JSONObject.writeJSONString(map, writer); writer.write(ENTER); writer.flush(); }
@SuppressWarnings("unchecked") protected void save() { try (OutputStreamWriter oos = new OutputStreamWriter(new GZIPOutputStream(new FileOutputStream(cacheFile)))) { JSONObject cacheObject = new JSONObject(); cacheObject.put("expMap", expMap); cacheObject.put("version", version); cacheObject.put("calculator", calculator); cacheObject.writeJSONString(oos); } catch (Exception ex) { ex.printStackTrace(); } }
public static void encode(Map<String,Object> obj, Object output) throws IOException { Writer w = toWriter(output); JSONObject.writeJSONString(obj, w); w.flush(); } }
public static void writeMapAsJson(Map<String, Object> map, File file) throws IOException { JSONObject metadataJson = toJSONObject(map); Writer writer = new FileWriter(file); metadataJson.writeJSONString(writer); writer.close(); }
@Override public void writeJSONString(Writer out) throws IOException { getJSON().writeJSONString(out); }
@Override public void encode(Object value, OutputStream os) throws Exception { PagedUniqueProcess.Results result = (PagedUniqueProcess.Results) value; JSONObject obj = new JSONObject(); obj.put("featureTypeName", result.getFeatureTypeName()); obj.put("fieldName", result.getFieldName()); obj.put("size", result.getSize()); obj.put("values", result.getValues()); Writer writer = new OutputStreamWriter(os); obj.writeJSONString(writer); writer.flush(); }
void run(OutputStream sink) { try { JmxRequest request = JmxRequestFactory.createPostRequest(pRequestMap, config.getProcessingParameters(pParams)); JSONObject json = manager.handleRequest(request); OutputStreamWriter writer = new OutputStreamWriter(sink); json.writeJSONString(writer); writer.flush(); } catch (JMException | IOException cause) { throw new AssertionError("Cannot invoke jolokia", cause); } }
public static void writeArtifactsToJson(File outputFile, S3ArtifactWrapper wrapper) throws IOException { JSONObject json = new JSONObject(); JSONArray artifacts = new JSONArray(); for (S3Artifact artifact : wrapper.getArtifacts()) { artifacts.add(toJsonObject(artifact)); } json.put("prefix", wrapper.getPrefix()); json.put("artifacts", artifacts); try (Writer writer = newWriter(outputFile)) { json.writeJSONString(writer); writer.flush(); } }