/** * Write a single {@link JobState} to json document. * * @param jsonWriter {@link com.google.gson.stream.JsonWriter} * @param jobState {@link JobState} to write to json document * @throws IOException */ private void writeJobState(JsonWriter jsonWriter, JobState jobState) throws IOException { jobState.toJson(jsonWriter, this.keepConfig); }
@Override public String toString() { StringWriter stringWriter = new StringWriter(); try (JsonWriter jsonWriter = new JsonWriter(stringWriter)) { jsonWriter.setIndent("\t"); this.toJson(jsonWriter, false); } catch (IOException ioe) { // Ignored } return stringWriter.toString(); }
/** * Write a single {@link JobState} to json document. * * @param jsonWriter {@link com.google.gson.stream.JsonWriter} * @param jobState {@link JobState} to write to json document * @throws IOException */ private void writeJobState(JsonWriter jsonWriter, JobState jobState) throws IOException { jobState.toJson(jsonWriter, this.keepConfig); }
@Override public String toString() { StringWriter stringWriter = new StringWriter(); try (JsonWriter jsonWriter = new JsonWriter(stringWriter)) { jsonWriter.setIndent("\t"); this.toJson(jsonWriter, false); } catch (IOException ioe) { // Ignored } return stringWriter.toString(); }