Multiple action execution order not guaranteed

Issue #36 new
Kevin Adler created an issue

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)

  1. Log in to comment