@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
public ArrayLinesWriter(final OutputStream outputStream, final ObjectMapper jsonMapper) throws IOException { this.outputStream = outputStream; this.jsonGenerator = jsonMapper.writer().getFactory().createGenerator(outputStream); jsonGenerator.setRootValueSeparator(new SerializedString("\n")); }
public ObjectLinesWriter(final OutputStream outputStream, final ObjectMapper jsonMapper) throws IOException { this.outputStream = outputStream; this.jsonGenerator = jsonMapper.writer().getFactory().createGenerator(outputStream); jsonGenerator.setRootValueSeparator(new SerializedString("\n")); }
private MaxwellJson() throws IOException { buffer = new ByteArrayOutputStream(); jsonGenerator = jsonFactory.createGenerator(buffer); jsonGenerator.setRootValueSeparator(null); plaintextGenerator = new PlaintextJsonGenerator(jsonGenerator); encryptingGenerator = new EncryptingJsonGenerator(jsonGenerator, jsonFactory); }
/** * @since 2.6 */ public void initialize(JsonGenerator gen) { PrettyPrinter pp = prettyPrinter; if (prettyPrinter != null) { if (pp == NULL_PRETTY_PRINTER) { gen.setPrettyPrinter(null); } else { if (pp instanceof Instantiatable<?>) { pp = (PrettyPrinter) ((Instantiatable<?>) pp).createInstance(); } gen.setPrettyPrinter(pp); } } if (characterEscapes != null) { gen.setCharacterEscapes(characterEscapes); } if (schema != null) { gen.setSchema(schema); } if (rootValueSeparator != null) { gen.setRootValueSeparator(rootValueSeparator); } } }
@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
@Override public JsonGenerator setRootValueSeparator(SerializableString sep) { delegate.setRootValueSeparator(sep); return this; }
public JsonEncoder() { try { jsonGenerator = new JsonFactory().createGenerator(writer); jsonGenerator.setRootValueSeparator(null); } catch (final IOException e) { throw new MetafactureException(e); } }
public ArrayLinesWriter(final OutputStream outputStream, final ObjectMapper jsonMapper) throws IOException { this.outputStream = outputStream; this.jsonGenerator = jsonMapper.writer().getFactory().createGenerator(outputStream); jsonGenerator.setRootValueSeparator(new SerializedString("\n")); }
public ObjectLinesWriter(final OutputStream outputStream, final ObjectMapper jsonMapper) throws IOException { this.outputStream = outputStream; this.jsonGenerator = jsonMapper.writer().getFactory().createGenerator(outputStream); jsonGenerator.setRootValueSeparator(new SerializedString("\n")); }
/** * @since 2.6 */ public void initialize(JsonGenerator gen) { PrettyPrinter pp = prettyPrinter; if (prettyPrinter != null) { if (pp == NULL_PRETTY_PRINTER) { gen.setPrettyPrinter(null); } else { if (pp instanceof Instantiatable<?>) { pp = (PrettyPrinter) ((Instantiatable<?>) pp).createInstance(); } gen.setPrettyPrinter(pp); } } if (characterEscapes != null) { gen.setCharacterEscapes(characterEscapes); } if (schema != null) { gen.setSchema(schema); } if (rootValueSeparator != null) { gen.setRootValueSeparator(rootValueSeparator); } } }
/** * @since 2.6 */ public void initialize(JsonGenerator gen) { PrettyPrinter pp = prettyPrinter; if (prettyPrinter != null) { if (pp == NULL_PRETTY_PRINTER) { gen.setPrettyPrinter(null); } else { if (pp instanceof Instantiatable<?>) { pp = (PrettyPrinter) ((Instantiatable<?>) pp).createInstance(); } gen.setPrettyPrinter(pp); } } if (characterEscapes != null) { gen.setCharacterEscapes(characterEscapes); } if (schema != null) { gen.setSchema(schema); } if (rootValueSeparator != null) { gen.setRootValueSeparator(rootValueSeparator); } } }
private JsonOutput<T> open(String path, JsonGenerator generator, Collection<? extends OutputOption> options) { configure(generator, JsonGenerator.Feature.AUTO_CLOSE_TARGET, true); configure(generator, JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT, true); configure(generator, JsonGenerator.Feature.ESCAPE_NON_ASCII, escapeNoAsciiCharacter); configure(generator, JsonGenerator.Feature.QUOTE_FIELD_NAMES, true); configure(generator, JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS, true); configure(generator, JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, usePlainDecimal); configure(generator, JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS, false); generator.setRootValueSeparator(new SerializedString(lineSeparator.getSequence())); return new OutputDriver<>(path, generator, properties); }