code: def to_jsondict(self):
          
          # XXX old api compat
          if self._composed_with_old_api():
              # copy object first because serialize_old is destructive
              o2 = OFPMatch()
              o2.fields = self.fields[:]
              # serialize and parse to fill OFPMatch._fields2
              buf = bytearray()
              o2.serialize(buf, 0)
              o = OFPMatch.parser(six.binary_type(buf), 0)
          else:
              o = self
  
          body = {"oxm_fields": [ofproto.oxm_to_jsondict(k, uv) for k, uv
                                 in o._fields2],
                  "length": o.length,
                  "type": o.type}
          return {self.__class__.__name__: body}
docs: Returns a dict expressing the flow match.