Interface JsonWriter

All Known Implementing Classes:
JsonWriterImpl

public interface JsonWriter
Version:
$Id: JsonWriter.java 34417 2009-07-23 14:42:56Z dkatayev $
Author:
Andrey Parfonov
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close output writer.
    void
    Flush output writer.
    void
    Write the end of JSON array ']'.
    void
    Write the end of JSON object '}'.
    void
    Write the key.
    void
    Write the null data to stream.
    void
    Write the start of JSON array '['.
    void
    Write the start of JSON object '{'.
    void
    Write the String to stream.
    void
    writeValue(boolean value)
    Write the value of boolean type to stream.
    void
    writeValue(double value)
    Write the value of double type to stream.
    void
    writeValue(long value)
    Write the value of long type to stream.
  • Method Details

    • writeStartObject

      void writeStartObject() throws JsonException
      Write the start of JSON object '{'.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeEndObject

      void writeEndObject() throws JsonException
      Write the end of JSON object '}'.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeStartArray

      void writeStartArray() throws JsonException
      Write the start of JSON array '['.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeKey

      void writeKey(String key) throws JsonException
      Write the key. After key will go the value. In this way data represented in JSON object.
      Parameters:
      key - the key.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeEndArray

      void writeEndArray() throws JsonException
      Write the end of JSON array ']'.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeString

      void writeString(String value) throws JsonException
      Write the String to stream.
      Parameters:
      value - the String.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeValue

      void writeValue(long value) throws JsonException
      Write the value of long type to stream.
      Parameters:
      value - the value of long type.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeValue

      void writeValue(double value) throws JsonException
      Write the value of double type to stream.
      Parameters:
      value - the value of double type.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeValue

      void writeValue(boolean value) throws JsonException
      Write the value of boolean type to stream.
      Parameters:
      value - the value of boolean type.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • writeNull

      void writeNull() throws JsonException
      Write the null data to stream.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • flush

      void flush() throws JsonException
      Flush output writer.
      Throws:
      JsonException - if any errors, include i/o errors occurs.
    • close

      void close() throws JsonException
      Close output writer.
      Throws:
      JsonException - if any errors, include i/o errors occurs.