↧
Answer by tim_yates for Convert XML to json from Groovy
You could write a function to return a single object (if the list is of length 1), or the list (if it contains more than one element):def crush = { list -> list?.size() == 1 ? list[ 0 ] : list}Then...
View ArticleConvert XML to json from Groovy
I want to code xml to json using groovy..i have the following code..but from the output {"note":[{"to":["Tove"]},{"from":["Jani"]},{"heading":["Reminder"]}]} i want to remove "[]" things from the...
View Article
More Pages to Explore .....