Connector Framework Server 23.2

# JSON Parsing Parameters

The parameters in this section configure how CFS parses JSON.

For example, consider the following JSON:

    {
        "DREREFERENCE": "reference",
        "FIELDS": [{
                "NAME": "myFirstField",
                "VALUE": "myFirstFieldValue"
            }, {
                "NAME": "mySecondField",
                "FIELDS": [{
                        "NAME": "mySubFieldName",
                        "VALUE": "mySubFieldValue",
                        "ATTRIBUTES": [{
                              "NAME": "attribute",
                              "VALUE": "attributeValue"
                            }
                        ]
                    }
                ]
            }
        ],
        "DRECONTENT": ["document content"]
    }

The following configuration parses the JSON into documents. This configuration extracts fields and sub-fields recursively, because the `FieldSections` parameter refers to the name of the section in which it is set:

    [JSONParsing]
    ReferencePath=DREREFERENCE
    ContentPaths=DRECONTENT
    ExpandArrays=true
    FieldSections=Field

    [Field]
    Path=FIELDS
    NamePath=NAME
    ValuePath=VALUE
    ExpandArrays=true
    FieldSections=Field
    AttributeSections=Attribute

    [Attribute]
    Path=ATTRIBUTES
    NamePath=NAME
    ValuePath=VALUE
    ExpandArrays=true

CFS produces the following document:

    #DREREFERENCE reference
    #DREFIELD myFirstField="myFirstFieldValue"
    #DREFIELD mySecondField/mySubFieldName="mySubFieldValue"
    #DREFIELD mySecondField/mySubFieldName/@attribute="attributeValue"
    #DRECONTENT
    document content
    #DREENDDOC

Copyright 2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Connector Framework Server 23.2

Topic Title: JSON Parsing Parameters