Sort Output from a Decision Service - Forum - Corticon - Progress Community

Sort Output from a Decision Service

 Forum

Sort Output from a Decision Service

This question is answered

Hi Guys,

Is there a way to sort the output that comes from Corticon (ie, input / output is json).

It really is just for ease of use while developing the program, good to have but not really required.

Thanks.

Verified Answer
  • Corticon does not sort the input or output JSON Objects.

    It is possible to accomplish using 3rd party tools.

    Per the JSON RFC (found here tools.ietf.org/.../rfc7159

    "JSON parsing libraries have been observed to differ as to whether or

      not they make the ordering of object members visible to calling

      software.  Implementations whose behavior does not depend on member

      ordering will be interoperable in the sense that they will not be

      affected by these differences."

All Replies
  • Joanne, are you looking to sort the order of entities (and sub entities) or the attributes on an entity? If entities, what criteria would you use for sorting?



  • Hi James, more the attributes in the entities, in alphabetical order, if I can. I know using ruletests in Corticon it does it now, but when I try using SOAPUI to pass in json input, the json output's order is not in any order at all.

  • Joanne, I don’t know of a way to do this. Perhaps SoapUI has means to do the sort.
     
    Jim
     



  • I know its been 3 years since this question answered. Does the final reply still stand true?

    Satya

  • Corticon does not sort the input or output JSON Objects.

    It is possible to accomplish using 3rd party tools.

    Per the JSON RFC (found here tools.ietf.org/.../rfc7159

    "JSON parsing libraries have been observed to differ as to whether or

      not they make the ordering of object members visible to calling

      software.  Implementations whose behavior does not depend on member

      ordering will be interoperable in the sense that they will not be

      affected by these differences."