This should be `to_json` instead of `into_json`, or instead it should consume `self`. We've standardized on using `into_` to represent methods that consume `self` to transform into the result`. Also, this should return an error type instead of failing.