Custom implementation of the toString() function.
a json string representation of the object. If the object can't be serialized to json, it returns the default toString() implementation