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

JSON.EqualContent

Checks if two JSON are equal in content.

Component Version macOS Windows Linux Server iOS SDK
JSON 10.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "JSON.EqualContent"; json1; json2 )   More

Parameters

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

Result

Returns 1, 0 or error.

Description

Checks if two JSON are equal in content.
We compare recursively all nodes.
If structure and values are the same, we return 1, otherwise 0.
Objects do not need to have same order for entries.

While JSON.Equals checks the type, this function does check the content.

Examples

Compare 123 with text to it as number:

MBS( "JSON.EqualContent"; "\"123\""; "123")

Example result: 1

Unicode escapes consider the same as inline characters:

MBS( "JSON.EqualContent"; "\"\uD83C\uDF4E\""; "\"🍎\""))

Example result: 1

See also

Release notes

Blog Entries

This function checks for a license.

Created 10th January 2020, last changed 31st January 2023


JSON.DeleteRecords - JSON.Equals