コード例 #1
0
    def novabase_to_dict(ref):
        request_uuid = uuid.uuid1()
        encoder = Encoder(request_uuid=request_uuid)
        decoder = Decoder(request_uuid=request_uuid)

        json_object = encoder.simplify(ref)
        json_object.pop("_metadata_novabase_classname")

        return decoder.desimplify(json_object)
コード例 #2
0
ファイル: __init__.py プロジェクト: msimonin/rome
def get_decoder(request_uuid=uuid.uuid1()):
    # if get_config().backend() == "cassandra":
    #     from lib.rome.core.dataformat.string import Decoder
    # else:
    from lib.rome.core.dataformat.json import Decoder
    return Decoder(request_uuid)