0

I have the below JSON and when I use it in Adobe Document Generation API, it gives an error as below. I'm not sure whats the issue with the JSON scheme.

[  
  {
    "OwnerID": "L001",
    "Properties": [
        [
            {
                "PropertyID": "P001",
                "Property Address": "12 St LA",
                "Rent": "300",
                "Bedroom ": "2 "
            }
        ],
        [
            {
                "PropertyID": "P002",
                "Property Address": "3 St SA",
                "Rent": "450",
                "Bedroom ": "3 "
            }
        ]
    ]
  },
  {
      "OwnerID": "L002",
      "Properties": [
        [
            {
                "PropertyID": "P003",
                "Property Address": "4 St SA",
                "Rent": "500",
                "Bedroom ": "4 "        
            }
        ]
    ]
  },
  {
      "OwnerID": "L003",
      "Properties": [
        [
            {
                "PropertyID": "P004",
                "Property Address": "20 St LA",
                "Rent": "400",
                "Bedroom ": "2 "
            }
        ]
    ]
  }
]

Adobe error message

If I used the first object in the JSON, there is no issue. Only when I use the complete JSON array do I get issues in Adobe Doc Generation.

{
    "OwnerID": "L001",
    "Properties": [
        [
            {
                "PropertyID": "P001",
                "Property Address": "12 St LA",
                "Rent": "300",
                "Bedroom ": "2 "
            }
        ],
        [
            {
                "PropertyID": "P002",
                "Property Address": "3 St SA",
                "Rent": "450",
                "Bedroom ": "3 "
            }
        ]
    ]
}
Aaron Meese
  • 1,670
  • 3
  • 22
  • 32
jsbev
  • 1
  • Can you reliably get this? The error msg truly sounds like a one time gremlin on our server. If you can get it again, please share the Word doc, and I'll try to reproduce. – Raymond Camden Nov 01 '22 at 19:13
  • Hi Raymond, I think you also replied to my post on the adobe community. https://community.adobe.com/t5/document-services-apis-discussions/adobe-doc-gen-it-seems-there-was-an-error-on-the-server/m-p/13316865#M5040 – jsbev Nov 03 '22 at 06:19

1 Answers1

0

Adobe Document Generation does not currently support passing in an array as the top level object. You will need to pass the array inside an object, even if just one key:

{
 "mystuff": [ .... ]
}

This has been reported internally.

Raymond Camden
  • 10,661
  • 3
  • 34
  • 68