[ardoJSON] Error when using JSON_Objectify from JSON_Listify Output

[ardoJSON] Error when using JSON_Objectify from JSON_Listify Output

Forge Component
Published on 2017-09-05 by Ricardo Silva
22 votes
Published on 2017-09-05 by Ricardo Silva

I encountered this error when using JSON_Objectify from JSON_Listify Output.

I use ToObject(GetUsers.List.Current) for Outsystems2JSON.

Also I entered the mandatory input parameter for JSON_Objectify Path with "" 

JSON_Listify input parameter Path is not mandatory though...

Hi Harlin,

Check that if you are giving input to JSON_Objectify from output of Outsystems2JSON and also confirm if it needs conversion ToObject().

Or also check if you need to execute any action before Outsystems2JSON.

Hi Suraj,

1. I was under impression that JSON_Objectify needed input from JSON_Listify output (from reading JSON_Objectify description)...

2. Yes, I do use ToObject(GetUsers.List.Current) on Outsystems2JSON

3. There is only an aggregate (User) before Outsystems2JSON action.

Can  you share the module where you're getting this error?

You don't need to always use JSON_Objectify on the output of a JSON_Listify, but it should always work.

Are you trying to do anything specific, or are you just testing out the functions?

I was just testing out the functions. (OML attached)

But I have requirement to do some old vs new field comparing for audit trail purpose (dynamically/reusable).

I cannot find a way to traverse JSON using Outsystems Flow...

(XML can be traversed easily though using Outsystems Flow, why JSON can't?)

So I intend to use ardoJSON to:

1. RecordList2JSON or your Outsystems2JSON

2. loop JSON record using JSONSelect with Path "$["+index+"]"

   a. JSONListify JSON record

   b. JSON2RecordList into key-value text structure

   c. Loop Key-Value Record List and do some comparing (while ignoring certain fields configurable by parameters)

Optionally/Ideally, I want to pass those old and new entities to Forge component's Human Readable Change History, which require record passed using ToObject().

I'm wondering, can I use JSONObjectify for that (after removing ignored field key-value on Listified record list)...

You probably can, but I don't think you want to ...

Check the answer to this post (strangely it's exactly the same use case and you're both trying to use ardoJSON to achieve it ...)