Adds documentation to #to_json helper