Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A
- String name,
- String age
- class B
- String report
- JSON.registerObjectMarshaller(A) {it->
- def result = [:]
- result['name'] = it.name
- result['age'] = it.age
- result['report'] = it.report //It throws an error no such property: report for class A.How to write it in a proper JSON format to retrieve the report value?
- return result
- }
Add Comment
Please, Sign In to add comment