Rundeck Xml --> Json

35 views
Skip to first unread message

vds 2604

unread,
Jun 28, 2023, 4:03:41 PM6/28/23
to rundeck-discuss
I am trying to change rundeck ruby code which is in xml format  and trying to convert to json format as xml format is depricating.Any idea on how to do this?

rac...@rundeck.com

unread,
Jun 28, 2023, 4:29:27 PM6/28/23
to rundeck-discuss
Hi,

Could you please elaborate? Do you mean converting the xml model's source to json? or a Rundeck job that converts xml code to json format using Ruby code?

If you need to implement that on a job, you can add the ruby code on a inline script step and define the ruby interpreter executable on "Invoction String" field and the ruby script extension on "File Extension", both options available by clicking on the "Advanced" link ("Script Step" step and "Script file or URL" step).

Here you can see an example of the ruby code.

Regards.

divya sree

unread,
Jun 29, 2023, 9:16:50 AM6/29/23
to rundeck-discuss
Not the rundeck job It is about converting few lines from large piece of ruby code using this ruby code they have made few API calls .Basically this code is to create project from our local to rundeck UI.If you want detailed explanation I can email to your inbox as there is a lot to explain about this
Reply all
Reply to author
Forward
0 new messages