Standardize toJSON and related