handle :only and :except options for as_json