Upgrading Core_Model (a new method as_json() has been added).