Forum Discussion
Hello, have you tried JsonBuilder?
Assumption: Initial JSON output is a response from a REST call or a pre-prepared JSON template
for ex:
import groovy.json.JsonBuilder
def JSON = context.expand('${TestStepName#Response}').toString()
NEWJSON = new JsonBuilder(JSON)
NEWJSON.content.OpenTaxFilters.HeldAwayIn = "Put desired value here"
log.info NEWJSON
Hope this helps!
Hi,
Currently, we don't have any of this test using Groovy. I understand what most examples are doing, but I'm not exactly fluid in Groovy yet (I've done a couple of simple XML-based events). The JsonBuilder sounds like it might be a possible solution but I'm not familiar with how it works or exactly how it would be implemented. Is there any good doc on that or a site you know of with good explanation?
Thanks,
Mike
Related Content
- 2 years agovericomms