code: def register(encoder=None, decoder=None):
      
      if encoder:
          _encoders.append(encoder)
      if decoder:
          _decoders.append(decoder)
docs: Registers an encoder method and/or a decoder method for processing
      custom values.  Encoder and decoders should take a single argument
      for the value to encode or decode, and return a tuple of (<bool>
      success, <variant> value).  A successful decode or encode should
      return True and the value.
      
      :param      encoder | <callable> || None
                  decoder | <callable> || None