code: def datagramReceived(self, data):
          
          try:
              obj = json.loads(data)
          except ValueError, e:
              log.err(e, 'Invalid JSON in stream: %r' % data)
              return
  
          if u'text' in obj:
              obj = Status.fromDict(obj)
          else:
              log.msg('Unsupported object %r' % obj)
              return
  
          self.callback(obj)
docs: Decode the JSON-encoded datagram and call the callback.