fixes #272
to_json -> as_json