storage: added instance.to_json method.