Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

JSON.CreateObject

Creates a new empty object node.

Component Version macOS Windows Linux Server iOS SDK
JSON 2.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "JSON.CreateObject" )

Parameters

none

Result

Returns JSON code.

Description

Creates a new empty object node.

Examples

Creates empty object:

MBS( "JSON.CreateObject" )

Example result:
{}

Build nested objects:

Set Variable [$j1; MBS( "JSON.CreateObject") ]
Set Variable [$j2; MBS( "JSON.AddStringToObject"; $j1; "name"; "" ) ]
Set Variable [$j3; MBS( "JSON.AddStringToObject"; $j2; "record_type"; "MX" ) ]
Display Dialog ["JSON"; $j3]
Set Variable [$j4; MBS( "JSON.CreateObject") ]
Set Variable [$j5; MBS( "JSON.AddItemToObject"; $j4; "record"; $j3 ) ]
Display Dialog ["JSON"; $j4]

See also

Example Databases

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 11st December 2016


JSON.CreateNumber - JSON.CreateObjectRef