Help Center

JsonWriter.Valuemethod

Emits a JSON string with escaping for quotes, backslashes, control chars, and nonprintables via \uXXXX.

WebViewmethoddocumented

Syntax

SUB Value (BYREF s AS WSTRING)
SUB Value (BYVAL n AS LONGINT)
SUB Value (BYVAL n AS DOUBLE)

Parameters

NameDescription
sThe string to emit.
nThe number to emit.

Description

Emits a JSON string with escaping for quotes, backslashes, control chars, and nonprintables via \uXXXX.

The numbers are converted to string with WSTR.

Examples

#include once "AfxNova/AfxJson.inc" USING AfxNova

DIM uni AS DWSTRING = "España — café — ?x" DIM jw AS JsonWriter jw.SetIndentSize(2) jw.BeginObject() jw.Name("title") : jw.Value("Unicode test") jw.Name("text") : jw.Value(uni) jw.EndObject() AfxMsg jw.ToBString

Unicode text (BMP): accents, em dash, Greek

Reference