Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3    Statistic    FMM    Blog  

Dictionary.FromJSON

Creates dictionary from JSON.

Component Version macOS Windows Linux Server iOS SDK
Dictionary 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Dictionary.FromJSON"; json )   More

Parameters

Parameter Description Example
json A JSON text or reference. {"key": "value"}

Result

Returns dictionary reference number or error.

Description

Creates dictionary from JSON.
Numbers and text are passed. Booleans become number. NULL will be empty text. Objects and arrays are passed as JSON as text.

Examples

Create from dictionary:

MBS( "Dictionary.FromJSON"; "{\"Hello\": \"World\"}" )

Create dictionary from JSON and return it back:

MBS( "Dictionary.ToJSON"; MBS( "Dictionary.FromJSON";
"{
\"Hello\": \"World\",
\"num\": 123,
\"value\": 123.456,
\"object\": {\"Hello\": \"World\"},
\"empty\": null,
\"array\": [1,2,3]}"))

See also

Release notes

Blog Entries

This function checks for a paid license.

Created 1st March 2021, last changed 1st March 2021


Dictionary.Deserialize - Dictionary.HasKey

💬 Ask a question or report a problem


Start Chat