docs: def format_item(self, item):
          """Format a single datum as a Resource object.
  
          See: http://jsonapi.org/format/#document-resource-objects
          """
          # http://jsonapi.org/format/#document-top-level
          # Primary data MUST be either... a single resource object, a single resource
          # identifier object, or null, for requests that target single resources
          if not item:
              return None
  
          ret = self.dict_class()
          ret[TYPE] = self.opts.type_
  
          # Get the schema attributes so we can confirm `dump-to` values exist
          attributes = {
              (get_dump_key(self.fields[field]) or field): field
              for field in self.fields
          }
  
          for field_name, value in iteritems(item):
              attribute = attributes[field_name]
              if attribute == ID:
                  ret[ID] = value
              elif isinstance(self.fields[attribute], DocumentMeta):
                  if not self.document_meta:
                      self.document_meta = self.dict_class()
                  self.document_meta.update(value)
              elif isinstance(self.fields[attribute], ResourceMeta):
                  if 'meta' not in ret:
                      ret['meta'] = self.dict_class()
                  ret['meta'].update(value)
              elif isinstance(self.fields[attribute], BaseRelationship):
                  if value:
                      if 'relationships' not in ret:
                          ret['relationships'] = self.dict_class()
                      ret['relationships'][self.inflect(field_name)] = value
              else:
                  if 'attributes' not in ret:
                      ret['attributes'] = self.dict_class()
                  ret['attributes'][self.inflect(field_name)] = value
  
          links = self.get_resource_links(item)
          if links:
              ret['links'] = links
          return ret