Guest User

Untitled

a guest
Sep 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class A
  2. String name,
  3. String age
  4.  
  5. class B
  6. String report
  7.  
  8. JSON.registerObjectMarshaller(A) {it->
  9. def result = [:]
  10. result['name'] = it.name
  11. result['age'] = it.age
  12. 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?
  13.  
  14. return result
  15. }
Add Comment
Please, Sign In to add comment