protected function formatJSON(SS_List $list) {
		$ret = array ();
		foreach($list as $item) {
			$ret[] = array(
				'id' => $item->{$this->idField},
				'label' => $item->{$this->labelField}
			);
		}

		return Convert::array2json($ret);
	}
protected function formatJSON(SS_List $list) {
		$ret = array ();
		foreach($list as $item) {
			$ret[] = array(
				'id' => $item->{$this->idField},
				'label' => $item->{$this->labelField}
			);
		}

		return Convert::array2json($ret);
	}
protected function formatJSON ( SS_List $ list ) { $ ret = array ( ) ; foreach ( $ list as $ item ) { $ ret [ ] = array ( 'id' => $ item -> { $ this -> idField } , 'label' => $ item -> { $ this -> labelField } ) ; } return Convert :: array2json ( $ ret ) ; }
Formats JSON so that it is usable by the JS component

@param  SS_List $list The list to format
@return string        JSON
Formats JSON so that it is usable by the JS component