nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.MIME.application.json / JSONWriter

JSONWriter

Full name Microsoft.VisualBasic.MIME.application.json.JSONWriter Assembly Microsoft.VisualBasic.MIME.application.json Members 6

01 Syntax

Microsoft.VisualBasic.MIME.application.json.JSONWriter

02 Methods

NameOverloadsSummary
jsonValueString 1 "..."
IsJsonNumber 1 true for the clr numeric primitive types that may be emitted as an unquoted json number.
jsonObjectString 1 {...}
jsonArrayString 1 [...]
escapeString 1 single-pass json string escaping.

03 Fields

NameOverloadsSummary
leaveOpen 1 when true, only flush the internal text writer on dispose and leave the underlying stream open so that the caller can continue writing to it afterwards.

04 Members

method jsonValueString #
jsonValueString(JsonValue)

"..."

Parameters
NameTypeDescription
objJsonValue

-

method IsJsonNumber #
IsJsonNumber(Object)

true for the clr numeric primitive types that may be emitted as an unquoted json number. any other type (char, guid, timespan, enum, uri, version, ...) must be serialized as a quoted string to stay valid json.

method jsonObjectString #
jsonObjectString(JsonObject, Int32)

{...}

Parameters
NameTypeDescription
objJsonObject

-

method jsonArrayString #
jsonArrayString(JsonArray, Int32)

[...]

Parameters
NameTypeDescription
arrJsonArray

-

method escapeString #
escapeString(String, Boolean)

single-pass json string escaping. the json-grammar characters (\\, ", tab, cr, lf, backspace, form-feed) and every other control character below 0x20 are always escaped. when escapeAllNonAscii is true, each non-ASCII character (>= 0x80, including every utf-16 code unit from the supplementary planes) is escaped as \uXXXX as well.

field leaveOpen #
leaveOpen

when true, only flush the internal text writer on dispose and leave the underlying stream open so that the caller can continue writing to it afterwards. when false (default), the text writer is disposed which also closes the underlying stream.