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.