« Xojo developer meetin… | Home | Crop a two side page … »

The new JSON.EqualContent function

Since version 10.0, released in January 2020, the MBS Plugin includes a new JSON function: JSON.EqualContent. This function checks whether two JSON texts have equal content. This function should not be mixed up with the JSON.Equals function, which checks if type and value are the same.

We want to compare the two functions directly. We have the values “123” as String and 123 as number. The values have the same content but different datatypes. If we write in the Script MBS( "JSON.Equals"; "\"123\""; "123") the result is 0 and that means that the parameter are not equal as data types don't match. If we pass both values to the JSON.EqualContent function the result would be 1, so the values are equal

MBS( "JSON.EqualContent"; "\"123\""; "123") => 1
MBS( "JSON.Equals"; "\"123\""; "123") => 0

We wish you much fun with this function. Let us know if you have questions about our MBS Plugin and the JSON functions.

By Stefanie Juchmes
28 02 20 - 08:46