Converts a JSON object to its string representation.
JSON is a lightweight data exchange format. It is described
at http://json.org. It is based on the Javascript
language.
The JSON Objects used in Seminar Pro contain a collection of
key-value pairs.
(The internal JSON
object is of Xojo type JSONItem [classic
Xojo framework])
Parameters:
Name |
Type |
Description |
jsnHandle |
Integer |
A
pointer to the created JSON object, of type Integer Is 0
or higher, if JSON object successfully has been created |
Returns:
Type |
Value |
Description |
String |
JSON string |
A string representation of an
existing JSON object. A Json string is embraced by curly
brackets and its key-value pairs are separated by commas. For example: {"subject":"title","member":true,"fee":20.550000000000001,"counter":15} |
Available in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript
Name |
GUID |
Send
Seminar Invoice by Email |
024F872B-9E87-499F-9D2D-208C4C32E4CF |
Hint: You can
find references to XojoScripts which make use of this function by sending the
following SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from
im_scripts where ScriptCode Like '%JsonToString%'
Example XojoScript:
Dim
handle As Integer
= JsonCreate
If
handle >= 0 Then
JsonSetValue(handle,"subject","title")
JsonSetValueBoolean(handle,"member",true)
JsonSetValueDouble(handle,"fee",20.55)
JsonSetValueInteger(handle,"counter",15)
Dim js As String = JsonToString(handle)
// We expect a string of
this form:
//
{"subject":"title","member":true,"fee":20.550000000000001,"counter":15}
MsgBox(js)
End
If