add use_json config variable to support JSON requests