Standardize toJSON and related

Shouldn't this return a string?