Discuss this help topic in SecureBlackbox Forum

Write

Declared in     See also     


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


This topic is under development…

Declaration

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

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

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

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

Parameters

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

Return value

    …

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.

Declared in

.NET:
  • Namespace: SBJSON
  • Assembly: SecureBlackbox.Base
VCL:
  • Unit: SBJSON
Java:
  • Package: SecureBlackbox.Base.jar
C++:
  • sbjson.h

See also:     NewNull     NewObject     NewArray     NewValue     Read    

Discuss this help topic in SecureBlackbox Forum