old_contents: import json
  
  """
  Add your own serializers, and key off format
  
  from pyservice.serialize import serializers
  
  dict = serializers[format]['deserialize'](string)
  string = serializers[format]['serialize'](dict)
  
  """
  
  
  class JsonSerializer(object):
      def serialize(self, data):
          return json.dumps(data)
  
      def deserialize(self, string):
          return json.loads(string)
  
  
  serializers = {
      'json': JsonSerializer()
  }
  
new_contents: import json
  import logging
  logger = logging.getLogger(__name__)
  
  """
  Add your own serializers, and key off format
  
  from pyservice.serialize import serializers
  
  dict = serializers[format]['deserialize'](string)
  string = serializers[format]['serialize'](dict)
  
  """
  
  
  class JsonSerializer(object):
      def serialize(self, data):
          logger.debug("serialize {}".format(data))
          return json.dumps(data)
  
      def deserialize(self, string):
          logger.debug("deserialize {}".format(string))
          return json.loads(string)
  
  
  serializers = {
      'json': JsonSerializer()
  }
  
subject: Add logging to JsonSerializer