Discuss this help topic in SecureBlackbox Forum

TElJsonEntity.Write

TElJsonEntity     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Creates a string, a buffer or a stream from the entity.

Declaration

[C#]
    string Write();
    string Write(char IndentChar, int CharsPerIndentLevel);
    int Write(ref byte[] Buffer, int StartIndex);
    int Write(char IndentChar, int CharsPerIndentLevel, ref byte[] Buffer, int StartIndex);
    int Write(System.IO.Stream Stream);
    int Write(char IndentChar, int CharsPerIndentLevel, System.IO.Stream Stream);

[VB.NET]
    Function Write() As String
    Function Write(ByVal IndentChar As Char, ByVal CharsPerIndentLevel As Integer) As String
    Function Write(ByRef Buffer As Byte(), ByVal StartIndex As Integer) As Integer
    Function Write(ByVal IndentChar As Char, ByVal CharsPerIndentLevel As Integer, ByRef Buffer As Byte(), ByVal StartIndex As Integer) As Integer
    Function Write(ByVal Stream As System.IO.Stream) As Integer
    Function Write(ByVal IndentChar As Char, ByVal CharsPerIndentLevel As Integer, ByVal Stream As System.IO.Stream) As Integer

[Pascal]
    function Write() : string;
    function Write( IndentChar : Char; CharsPerIndentLevel : Integer) : string;
    function Write( var Buffer : ByteArray; StartIndex : Integer) : Integer;
    function Write( IndentChar : Char; CharsPerIndentLevel : Integer; var Buffer : ByteArray; StartIndex : Integer) : Integer;
    function Write( Stream : TElStream) : Integer;
    function Write( IndentChar : Char; CharsPerIndentLevel : Integer; Stream : TElStream) : Integer;

[C++]
    void Write(std::string &OutResult);
    void Write(char IndentChar, int32_t CharsPerIndentLevel, std::string &OutResult);
    int32_t Write(std::vector<uint8_t> &Buffer, int32_t StartIndex);
    int32_t Write(char IndentChar, int32_t CharsPerIndentLevel, std::vector<uint8_t> &Buffer, int32_t StartIndex);
    int32_t Write(TStream &Stream);
    int32_t Write(TStream *Stream);
    int32_t Write(char IndentChar, int32_t CharsPerIndentLevel, TStream &Stream);
    int32_t Write(char IndentChar, int32_t CharsPerIndentLevel, TStream *Stream);

[PHP]
    string Write()
    string Write(char $IndentChar, integer $CharsPerIndentLevel)
    integer Write(array of byte|string &$Buffer, integer $StartIndex)
    integer Write(char $IndentChar, integer $CharsPerIndentLevel, array of byte|string &$Buffer, integer $StartIndex)
    integer Write(TStream $Stream)
    integer Write(char $IndentChar, integer $CharsPerIndentLevel, TStream $Stream)

[Java]
    String write();
    int write(TElStream Stream);
    int write(byte[][] Buffer, int StartIndex);
    int write(char IndentChar, int CharsPerIndentLevel, byte[][] Buffer, int StartIndex);
    int write(char IndentChar, int CharsPerIndentLevel, TElStream Stream);
    String write(char IndentChar, int CharsPerIndentLevel);

Parameters

  • IndentChar -
  • CharsPerIndentLevel -
  • Buffer -
  • StartIndex -
  • Stream -

Description

    (1) Assembles Entity to a string without formatting; Entity must be of type either TElJsonArray or TElJsonObject.
    (2) Assembles Entity to a string with formatting; IndentChar specifies a character to be used for JSON-text indentation, it should be either tab (#9) or space (#32); CharsePerIndentLevel specifies how many characters are added at the beginning of a line on each next indentation level.
    (3) Assembles Entity without formatting to Buffer starting from StartIndex. If there is not enough room in the buffer, it will be resized. The routine returns the number of bytes written to Buffer. UTF-8 encoding is used to translate Unicode characters to bytes.
    (4) Assembles Entity with formatting to Buffer starting from StartIndex. IndentChar specifies a character to be used for JSON-text indentation, it should be either tab (#9) or space (#32); CharsePerIndentLevel specifies how many characters are added at the beginning of a line on each next indentation level. If there is not enough room in the buffer, it will be resized. The routine returns the number of bytes written to Buffer. UTF-8 encoding is used to convert Unicode characters to bytes.
    (5) Assembles Entity to Stream without formatting. Returns the number of bytes written to the stream. UTF-8 encoding is used to translate Unicode characters to bytes.
    (6) Assembles Entity with formatting to Stream. IndentChar specifies a character to be used for JSON-text indentation, it should be either tab (#9) or space (#32); CharsePerIndentLevel specifies how many characters are added at the beginning of a line on each next indentation level. The routine returns the number of bytes written to Stream. UTF-8 encoding is used to convert Unicode characters to bytes.

See also:     Read method    

Discuss this help topic in SecureBlackbox Forum