add as_json, as_hash methods, update docs