update dox for toJSON