Integration

Get Involved. Join the Conversation.

Topic

    Bilal Diallo
    OICS REST API JSON response error Failed to generate XMLAnswered
    Topic posted November 4, 2019 by Bilal DialloGreen Ribbon: 100+ Points, tagged API, Integration, PaaS, REST 
    22 Views, 4 Comments
    Title:
    OICS REST API JSON response error Failed to generate XML
    Summary:
    Got an error when trying to load the .json file or with inline command for a valid json
    Content:

    Hello

    I've got an error when I'm trying to load or inline command for a response JSON file for REST API.

    The Json I'm trying to add is the sample response from dropbox API below (from https://www.dropbox.com/developers/documentation/http/documentation#files-search).

     

     

     

     

    {
        "matches": [
            {
                "metadata": {
                    ".tag": "metadata",
                    "metadata": {
                        ".tag": "file",
                        "name": "Prime_Numbers.txt",
                        "id": "id:a4ayc_80_OEAAAAAAAAAXw",
                        "client_modified": "2015-05-12T15:50:38Z",
                        "server_modified": "2015-05-12T15:50:38Z",
                        "rev": "a1c10ce0dd78",
                        "size": 7212,
                        "path_lower": "/homework/math/prime_numbers.txt",
                        "path_display": "/Homework/math/Prime_Numbers.txt",
                        "sharing_info": {
                            "read_only": true,
                            "parent_shared_folder_id": "84528192421",
                            "modified_by": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc"
                        },
                        "is_downloadable": true,
                        "property_groups": [
                            {
                                "template_id": "ptid:1a5n2i6d3OYEAAAAAAAAAYa",
                                "fields": [
                                    {
                                        "name": "Security Policy",
                                        "value": "Confidential"
                                    }
                                ]
                            }
                        ],
                        "has_explicit_shared_members": false,
                        "content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
                    }
                }
            }
        ],
        "has_more": false
    }
    
    Version:
    19.3.3.0.0
    Document:
    Sample.json (526 Bytes)

    Best Comment

    Hemanth Lakkaraju

    Remove the .tag element/key in the sample json.

    Comment

     

    • Hemanth Lakkaraju

      Internally JSON is converted to XML in OIC and .tag is not a valid XML entity name and that's the reason you see the error. Please file an ER on OIC.

      Also refer this to see what special characters are supported in JSON Keys and how they should be used.