/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, String lineIndenter, String newLine) { this(writer, 0, new Format( lineIndenter.toCharArray(), newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, String lineIndenter) { this(writer, 0, new Format( lineIndenter.toCharArray(), new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @since 1.3.1 * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, int, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter, String newLine, int mode) { this(writer, mode, new Format( lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * Create a JsonWriter where the writer mode can be chosen. * * @param writer the {@link Writer} where the JSON is written to * @param mode the JsonWriter mode * @since 1.3.1 * @see #JsonWriter(Writer, int, Format) */ public JsonWriter(Writer writer, int mode) { this(writer, mode, new Format()); }
/** * @since 1.3.1 * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, int, Format) instead} */ @Deprecated public JsonWriter(final Writer writer, final char[] lineIndenter, final String newLine, final int mode) { this(writer, mode, new Format(lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ @Deprecated public JsonWriter(final Writer writer, final String lineIndenter, final String newLine) { this(writer, 0, new Format(lineIndenter.toCharArray(), newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ @Deprecated public JsonWriter(final Writer writer, final char[] lineIndenter) { this(writer, 0, new Format(lineIndenter, new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @since 1.3.1 * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, int, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter, String newLine, int mode) { this(writer, mode, new Format( lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter) { this(writer, 0, new Format(lineIndenter, new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter, String newLine) { this(writer, 0, new Format( lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * Create a JsonWriter where the writer mode can be chosen. * * @param writer the {@link Writer} where the JSON is written to * @param mode the JsonWriter mode * @since 1.3.1 * @see #JsonWriter(Writer, int, Format) */ public JsonWriter(Writer writer, int mode) { this(writer, mode, new Format()); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, String lineIndenter, String newLine) { this(writer, 0, new Format( lineIndenter.toCharArray(), newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ @Deprecated public JsonWriter(final Writer writer, final char[] lineIndenter, final String newLine) { this(writer, 0, new Format(lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * Create a JsonWriter where the writer mode can be chosen. * * @param writer the {@link Writer} where the JSON is written to * @param mode the JsonWriter mode * @since 1.3.1 * @see #JsonWriter(Writer, int, Format) */ public JsonWriter(final Writer writer, final int mode) { this(writer, mode, new Format()); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ @Deprecated public JsonWriter(final Writer writer, final String lineIndenter) { this(writer, 0, new Format(lineIndenter.toCharArray(), new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * Create a JsonWriter where the writer mode can be chosen. * * @param writer the {@link Writer} where the JSON is written to * @param mode the JsonWriter mode * @since 1.3.1 * @see #JsonWriter(Writer, int, Format) */ public JsonWriter(Writer writer, int mode) { this(writer, mode, new Format()); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter, String newLine) { this(writer, 0, new Format( lineIndenter, newLine.toCharArray(), Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
/** * @deprecated As of 1.4 use {@link JsonWriter#JsonWriter(Writer, Format) instead} */ public JsonWriter(Writer writer, char[] lineIndenter) { this(writer, 0, new Format(lineIndenter, new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
public JsonWriter(Writer writer) { this(writer, 0, new Format( new char[]{' ', ' '}, new char[]{'\n'}, Format.SPACE_AFTER_LABEL | Format.COMPACT_EMPTY_ELEMENT)); }
@Override public HierarchicalStreamWriter createWriter(Writer writer) { return new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE, new JsonWriter.Format(new char[0], new char[0], JsonWriter.Format.SPACE_AFTER_LABEL | JsonWriter.Format.COMPACT_EMPTY_ELEMENT)); } });