Are the `as_json` and `to_json` actually used? I assumed we'd use it in the logging, but it doesn't seem to be the case.