Define as_json instead of to_json
Merge pull request #714 from ride/to-json-as-json

Define as_json instead of to_json