Bluestep JS Documentation
    Preparing search index...

    Class JsonWriter

    Writes a JSON (RFC 7159) encoded value to a stream, one token at a time. The stream includes both literal values (strings, numbers, booleans and nulls) as well as the begin and end delimiters of objects and arrays.

    See com.google.gson.stream.JsonWriter for full documentation

    Index

    Constructors

    Methods

    • Begins encoding a new array.

      Returns JsonWriter

    • Begins encoding a new object.

      Returns JsonWriter

    • Flushes and closes this writer and the underlying Writer.

      Returns void

    • Ends encoding the current array.

      Returns JsonWriter

    • Ends encoding the current object.

      Returns JsonWriter

    • Ensures all buffered data is written to the underlying Writer and flushes that writer.

      Returns void

    • Returns true if object members are serialized when their value is null.

      Returns boolean

    • Returns true if this writer writes JSON that's safe for inclusion in HTML and XML documents.

      Returns boolean

    • Returns true if this writer has relaxed syntax rules.

      Returns boolean

    • Writes value directly to the writer without quoting or escaping.

      Parameters

      • value: string

      Returns JsonWriter

    • Encodes the property name.

      Parameters

      • name: string

      Returns JsonWriter

    • Encodes null.

      Returns JsonWriter

    • Configure this writer to emit JSON that's safe for direct inclusion in HTML and XML documents.

      Parameters

      • htmlSafe: boolean

      Returns void

    • Sets the indentation string to be repeated for each level of indentation in the encoded document.

      Parameters

      • indent: string

      Returns void

    • Configure this writer to relax its syntax rules.

      Parameters

      • lenient: boolean

      Returns void

    • Sets whether object members are serialized when their value is null.

      Parameters

      • serializeNulls: boolean

      Returns void

    • Encodes value.

      Parameters

      • value: string | number | boolean

      Returns JsonWriter