Hi - 

Is there a convenient way to get only the differences between two json strings 
(or JSONObjects, or Dictionaries)?

Say I have JSON objects (or dictionaries constructed from JSON strings):

A
{
    "glossary": {
        "title": "example glossary",
                "GlossDiv": {
            "title": "S",
                        "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                                        "SortAs": "SGML",
                                        "GlossTerm": "Standard Generalized 
Markup Language",
                                        "Acronym": "SGML",
                                        "Abbrev": "ISO 8879:1986",
                                        "GlossDef": {
                        "para": "A meta-markup language, used to create markup 
languages such as DocBook.",
                                                "GlossSeeAlso": ["GML", "XML"]
                    },
                                        "GlossSee": "markup"
                }
            }
        }
    }
}

and 

B

{
    "glossary": {
        "title": "example glossary",
                "GlossDiv": {
            "title": "XXXXXXX",
                        "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                                        "SortAs": "SGML",
                                        "GlossTerm": "Standard Generalized 
Markup Language",
                                        "Acronym": "SGML",
                                        "Abbrev": "XXXXXXX",
                                        "GlossDef": {
                        "para": "A meta-markup language, used to create markup 
languages such as DocBook.",
                                                "GlossSeeAlso": ["GML", "XML"]
                    },
                                        "GlossSee": "markup"
                }
            }
        }
    }
}

(assuming they aren't pretty printed and aren't in the same key-value order 
when created)

Is there a method in Pharo that will pull out the key-value pair with  the  
"XXXXXXX" values  in piece B if I compare it with piece A?  



Reply via email to