public static function reader($config = null, $default = false) {
		if (empty($config)) {
			$config = array(
				'id' => 'json',
				'className' => 'JsonReader',
				'location' => 'Common.Configure'
			);
		}

		if (!is_array($config)) {
			$config = array(
				'id' => $config,
				'className' => ucfirst($config) . 'Reader',
				'location' => 'Configure'
			);
		}

		extract($config);

		if (Configure::configured($id)) {
			throw new ConfigureException(__d('_common_', "A reader with the '%s' name already exists.", $id));
		}

		foreach (array('id', 'className', 'location') as $var) {
			if (!isset($$var) || empty($$var)) {
				throw new ConfigureException(__d('_common_', "Reader configuration missing the '%s' key.", $key));
			}
		}

		App::uses($className, $location);
		Configure::config($default ? 'default' : $id, new $className);

		return $config;
	}