[ardoJSON] How to convert JSON to a list?

[ardoJSON] How to convert JSON to a list?

Forge Component
Published on 2 May (3 weeks ago) by Ricardo Silva
22 votes
Published on 2 May (3 weeks ago) by Ricardo Silva
I have an complex-xml, which I have converted to json, so I can easily create the structures with the REST-webservice.
Now I want to load the XML into the structures...
XML -> XML2JSON -> JSON2Recordlist.

But it fails, because it's a list and not a recordlist.

Do I still have to change all stuff to records and recordlists?
Is there a better way?

What do you mean it fails ? What error do you get?

There was recently a bug corrected in ardoJSON's 1.7.2 Java version which affected basic type lists. Could this be it? 

Are you using the latest version?

Actually I don't get any error, just empty stuff.

yes I use the latest version.

the steps I am taking:

- convert xml2json with online tool with http://codebeautify.org/xmltojson
- create a consume REST-webservice with the generated JSON (dummy)
- button with the following actions: XML2JSON, JSON2RECORDLIST
using this component to do xml2json: http://www.outsystems.com/forge/component/268/json/

The only difference between the json's are some empty strings are generated as null in the xml2json.

I am going to replicate it on my personal environment so I can post the oml :)


I have sent you a PM.


In the attached eSpace I have been able to consume the JSON using exactly the procedure you described:

1) Took the json provided by your espace
2) used it in RESTWebServices
3) imported the wsdl
4) used JSON2RecordList of the same JSON

I'm seeing data being filled. I notice that the JSON component you're using to convert from XML to JSON uses a different version of JSON.Net than ardoJSON. Can you test this without using the xml2json in the same eSpace ?

Best regards,
Ricardo Silva

doesn't work as well.

Next steps I have done:

"copied" the xml2json to ardoJSON, so it uses the same json.net library.

instead of using the online tool, i did the following:

xml2json of the ardoJson-variant.
import that JSON with the outsystems-rest-consumption
then do the
xml2json -> json2recordlist both of the ardoJson variant.

the plot thickens, but find it weird there are "differences"...

Hi J,

Were you able to overcome the difficulties you were having here?
nope, kinda abandoned this way for the time being.