Connector Framework Server 12.11

# 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 2022 Micro Focus or one of its affiliates
Version 12.11 | Last updated February 2022

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 12.11

Topic Title: JSON Parsing Parameters