Multiple action execution order not guaranteed
Issue #36
new
Due to the format of the JSON that db2sock uses, it seems that when specifying multiple actions there is no way to ensure the actions will be performed in a specific order. The problem is that it uses the key in the parent object to define the action to be performed, but JSON keys are not defined to be in a specified order. Thus when it is parsed, it could be executed in any order:
eg. The following json could call DB2JSON/HELLO or some other HELLO:
{
"cmd": {
"exec": "ADDLIBLE DB2JSON"
},
"pgm": [{
"name": "HELLO"
},
{
"s": {
"name": "char",
"type": "128a",
"value": "Hi there"
}
}
]
}
Comments (1)
-
reporter - Log in to comment
Making the top level object an array would ensure the ordering. Basically the same solution as https://bitbucket.org/litmis/db2sock/issues/35/calling-multiple-actions-of-the-same-type#comment-46887751