fixed IS_JSON, thanks Alan