function deserialise($text) { $data = json_decode($text); return $this->strip_surrounding_quotes(is_null($data) ? $text : $data); }