Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.

Add JSON Verbs to IDM Engine and Designer

Idea ID 2844334

Add JSON Verbs to IDM Engine and Designer

Today, when I build a REST driver I have to handle all the XDS > JSON and JSON > XDS transformations in ECMAScript. There is some default ECMAScript that is supplied, but it doesn't fit most REST implementations. Most of the driver is so configurable, but this part requires some serious ECMAScript parsing talent. I noticed in IDM 4.8 there is the addition of 2 new DirXML Script nouns:

  1. Json Object
  2. Json Array

These would seem to work for constructing a JSON object if I was able to supply all object properties at once, and constructing an array similarly. In reality, the XDS document coming into my policy may take many forms. I will more than likely need to iterate in some kind of for-each loop to build an object and append key-value pairs. A verb like "Set JSON Property" would be nice, and it would be nice to be able to supply it with different types: string, number, array, nested JSON object. Similarly, I may not know all the values of a JSON array at once, so it would be nice to be able to append an item to an array (i.e. push()), and remove an item from an array by value (i.e. combination of indexOf() and splice()).

It might also be nice to have a "Get JSON Property" that uses something like JSONPath to grab a property from 1 or many levels deep. This would be most helpful on the input transform to build proper status docs and parse the status codes/messages as well as pull association values from successful adds or matches.

Again, this is solvable today with ECMAScript, but it would be nice to be able to do it natively.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.