I am just returning to webMethods development after being away for a few years. I have a JSON file that is in an array format. It is actually the output of a website. When I try to create a JSON Document in the Designer I get an Error on the format. This is a very standard well known site and I have successfully used this site in other environments.
The error I get while trying to “Create a New JSON Document Type” is:
Invalid JSON schema: #: expected type is one of Boolean or JSON Object, found: JSON Array
What version of Integration Server are you using? Support for JSON documents with an array at the root was added (I think) in 9.10. The generated doctype will have an array element at its root with a name of $rootArray.
Michael, I was testing this to help Page and here are my observations -
When I try to create a “JSON Document Type” artefact, both the URL and File options fail with the error message that Page shared (this artefact was not in the 9.x versions)
I did succeed by creating the good old “Document Type” and then selecting JSON as the source type; this was successfully created with the structure you have shown above
Thus, the question is whether JSON Document Type artefact supports creating from JSON Arrays (possible bug, if it does) or not.
Thanks Michael, Wouldn’t you know it. I come back to wM after 2 years and find a bug in the first weekend. That’s what I get for trying something new. I will give it the good old fashion try.