code: def serialize_to_json(self, name, datas):
          
          data_object = datas.get('object', None)
  
          if data_object is None:
              msg = ("JSON reference '{}' lacks of required 'object' variable")
              raise SerializerError(msg.format(name))
  
          try:
              content = json.loads(data_object, object_pairs_hook=OrderedDict)
          except json.JSONDecodeError as e:
              msg = "JSON reference '{}' raised error from JSON decoder: {}"
              raise SerializerError(msg.format(name, e))
          else:
              return content
docs: Serialize given datas to any object from assumed JSON string.
  
          Arguments:
              name (string): Name only used inside possible exception message.
              datas (dict): Datas to serialize.
  
          Returns:
              object: Object depending from JSON content.