docs: def resources_to_json(resources):
      """ Make a JSON/catalog representation of the resources db """
      return {
          docname: clean_resource_json(resource.__json__(resources))
          for (docname, resource)
          in resources.items()
      }