Call toJSON method from prototype Object class
Merge pull request #2 from aligent/bugfixes

Call toJSON method from prototype Object class