I have been experimenting with the groovy JsonBuilder[1] and I find it 
quite capable in generating dynamic JSON. I'm not aware of any Jenkins 
plugin for what you are looking for though.
[1] http://docs.groovy-lang.org/latest/html/gapi/groovy/json/JsonBuilder.html

Cheers
Ioannis

On Thursday, February 18, 2016 at 5:04:45 AM UTC-5, Niksan wrote:
>
> I have a job which has a groovy script and inside there I have a JSON like 
> array which I parse, I'd like to offload this array to a JSON file on disk 
> but it contains some elements that are gathered from parameters for the job.
>
> What's the best way of injecting / replacing tokens in a JSON file that 
> was loaded up in to a groovy script, are there any helpers already in 
> Jenkins land to assist with this or would it be a case of traversing the 
> whole array and manually replacing tokens with variables?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/71857adf-709f-4aa6-b6b5-d000c1219284%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to