Fix: better documentation for toJson (Thanks to tardyp)