Improved toJSON to call toJSON on property values
Added toJSON sub-call