Example #1
0
    types = (float, )

    def serialize(self, value):
        return float(value)


class IntegerSerializer(Serializer):
    types = (int, )

    def serialize(self, value):
        return int(value)


class LongSerializer(Serializer):
    types = (int, )

    def serialize(self, value):
        return int(value)


register(IterableSerializer)
register(UUIDSerializer)
register(DictSerializer)
register(UnicodeSerializer)
register(StringSerializer)
register(TypeSerializer)
register(BooleanSerializer)
register(FloatSerializer)
register(IntegerSerializer)
register(LongSerializer)
Example #2
0
    types = (float,)

    def serialize(self, value):
        return float(value)


class IntegerSerializer(Serializer):
    types = (int,)

    def serialize(self, value):
        return int(value)


class LongSerializer(Serializer):
    types = (long,)

    def serialize(self, value):
        return long(value)


register(IterableSerializer)
register(UUIDSerializer)
register(DictSerializer)
register(UnicodeSerializer)
register(StringSerializer)
register(TypeSerializer)
register(BooleanSerializer)
register(FloatSerializer)
register(IntegerSerializer)
register(LongSerializer)