from __future__ import absolute_import

import json
import cPickle as pickle


class ISerializer(object):
    pass


class JSON(ISerializer):
    @staticmethod
    def encode(item):
        return json.dumps(item)

    @staticmethod
    def decode(item):
        return json.loads(item)


class String(ISerializer):
    @staticmethod
    def encode(item):
        return str(item)

    @staticmethod
    def decode(item):
        return item


class Numeric(ISerializer):
    @staticmethod
    def encode(item):
        return int(item)

    @staticmethod
    def decode(item):
        return int(item)


class Pickle(ISerializer):
    @staticmethod
    def encode(item):
        return pickle.dumps(item)

    @staticmethod
    def decode(item):
        return pickle.loads(item)

@@ -82,62 +82,19 @@
 ass 
-ISerializer(object):%0A    pass%0A%0A%0Aclass JSON(ISerializer
+JSON(object
 ):%0A 
@@ -252,27 +252,22 @@
  String(
-ISerializer
+object
 ):%0A    @
@@ -403,27 +403,22 @@
 Numeric(
-ISerializer
+object
 ):%0A    @
@@ -562,19 +562,14 @@
 kle(
-ISerializer
+object
 ):%0A 

drop serializer interface