Customer Portal

Comments 1

  • Avatar
    simaj
    0
    Comment actions Permalink
    Hi,

    The difference between JsonExtract and JsonReader is in the parser they use. The JsonExtract converts documents through SAX parser while JsonReader uses DOM parser. In a nutshell SAX parser goes through document from the top to the bottom and breaks his structure into the sequence of events that announces start and the end of each object, content of their properties etc. As the events do not carry references to the higher objects, JsonExtract can only recognize where one object starts and ends and so it can only combine attributes from the same object.
    For instance in the document below "_id" and "_recordId" lies in different objects so JsonExtract cannot map both on the same edge. However JsonExtract can extract them separately and then by using other components merge them as it is done in the attached example. Both _id and _recordId are sent on separate edge with a sequence number. The sequence number is used to identify "_id" with "_recordId" and to join them together.

    {
    "GeneralInfo": {
    "Attributes": {
    "Name": "Test Name",
    "_id": "1996837697",
    "Description": "Test Description"
    },
    },
    "_recordId": "56v6t19xp9rni7",
    "_recordDate": "06-Feb-2015"
    }

Please sign in to leave a comment.