Re: Misformatting json output

2022-06-06 Thread James McMahon
fieldC is a hash value, a mix of letters and numbers. It is not shown surrounded by quotes as incoming data, but I could use a toString() or equivalent in Groovy to make it a string in advance of my Json formatting, if that helps matters. One difference I note is that in your data[ ] map, each of

Misformatting json output

2022-06-06 Thread James McMahon
I am having problems properly formatting Json output to requirements. I have three fields, similar to this: fieldA has value {"lname":"Smith", "fname":"John"} fieldB has value {"age":"21", "gender":"M"} fields has value 12345 I put each into an empty Groovy map, result[:] . I'm required to