jaccomoc/jactl

Error - No such field 'toJson'

Closed this issue · 1 comments

Trying out the toJson support as described - https://jactl.io/language-guide#json-support

java -cp jactl-repl-1.2.0.jar io.jactl.repl.Repl     

> class Address { String street; String suburb; String state }
> class Employee { String name; int employeeId; Address homeAddress }
> def jim = new Employee('Jim Henderson', 1234, [street:'123 High St', suburb:'Downtown', state:'South Australia'])
> [name:'Jim Henderson', employeeId:1234, homeAddress:[street:'123 High St', suburb:'Downtown', state:'South Australia']]
[name:'Jim Henderson', employeeId:1234, homeAddress:[street:'123 High St', suburb:'Downtown', state:'South Australia']]
> jim.toJson()
No such field 'toJson' for type io.jactl.pkg.Employee @ line 1, column 5
jim.toJson()
    ^