code: def discover_json(self):
          
          try:
              import simplejson as json
          except ImportError:
              import json
          self.register('json', json.loads, json.dumps)
docs: Discovers the JSON format and registers it if available.
  
          To speed up JSON parsing and composing, install `simplejson`::
  
              pip install simplejson
  
          The standard library module `json` will be used by default.