JSON_Compare

Stable Version 1.0.0 (OutSystems 10)
Published on 29 November 2017 by 
Created on 29 November 2017
Details
Small extension to compare two JSON strings. I use it to audit user changes to records
Read More

Gives a textual comparison between two JSON strings. Works with recursive objects and with arrays.

Optional parameters allow some formatting of the result string:

Parameter
Description
Default
KeyPrefix
Text inserted before the key name of the changed property
""
KeySuffix
Text inserted after the key name of the changed property
": "
ChangeSeparator
Text inserted between changed values
" > "
PropertySeparator
Text separator between properties
", "
ExcludeProperties
List of key names that will not be compared and not included in the result
"ChangedBy;DateChanged;Changed"


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



Reviews (0)
Category
Developer Tools
Tags
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Steven Phipps who created this component.
Dependencies
JSON_Compare has no dependencies.
Requirements
Platform
10.0.0.402
Database
All
Stack
.NET
Component Consumers
No consumers yet.
Weekly Downloads 
Related Components
Discovery
Architecture Team
A tool to discover and measure your architecture and understand how to improve
3456
OutSystems Now
OutSystems R&D
OutSystems Now brings your OutSystems experience to any device.
9081
Infosistema DMM
Infosistema Solutions
Infosistema Data Migration Manager (DMM) - With DMM you reduce costs by saving hundreds of hours building custom scripts, increase quality and allow unprecedented flexibility in managing your data. DMM enables data migration across OutSystems environments or servers (v9 or v10) using a simple user interface without the need of building custom scripts. It also supports features like data anonymization and data scramble, essential to comply with GDPR.
346