Gives a textual comparison between two JSON strings. Works with recursive objects and with arrays.
Optional parameters allow some formatting of the result string:
Example
Comparing these two JSON strings:
{ "name":"John", "age":30, "cars": [ { "name":"Ford", "models":[ "Fiesta", "Focus", "Mustang" ] }, { "name":"BMW", "models":[ "320", "X3", "X5" ] }, { "name":"Fiat", "models":[ "500", "Panda" ] } ] }
{ "name":"Johnny", "age":30, "cars": [ { "name":"Ford", "models":[ "Fiesta", "Ka", "Mustang" ] }, { "name":"BMW", "models":[ "350", "X3", "X5" ] }, { "name":"Seat", "models":[ "500", "Panda" ] } ] }
The default result is:
name: John > Johnny, models[1]: Focus > Ka, models[0]: 320 > 350, name: Fiat > Seat