예제 #1
0
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    
예제 #2
0
def deserialize_item_raw(collection_type, item_name):
    data = couch.openDoc(collection_type, item_name)
    return simplejson.loads(data, encoding="utf-8")