def deserialize_raw(collection_type): items = couch.listDoc(collection_type) if collection_type == "settings": fd = open("/etc/cobbler/settings") datastruct = yaml.load(fd.read()) fd.close() return datastruct else: results = [] for f in items: data = couch.openDoc(collection_type, f) datastruct = simplejson.loads(ydata, encoding='utf-8') return results
def deserialize_item_raw(collection_type, item_name): data = couch.openDoc(collection_type, item_name) return simplejson.loads(data, encoding="utf-8")