code: def from_json(self, resource_root, data):
      
      if data is None:
        return None
  
      if self._atype == datetime.datetime:
        return datetime.datetime.strptime(data, self.DATE_FMT)
      elif self._atype == ApiConfig:
        # ApiConfig is special. We want a python dictionary for summary views,
        # but an ApiList for full views. Try to detect each case from the JSON
        # data.
        if not data['items']:
          return { }
        first = data['items'][0]
        return json_to_config(data, len(first) == 2)
      elif self._is_api_list:
        return ApiList.from_json_dict(data, resource_root, self._atype)
      elif isinstance(data, list):
        return [ self.from_json(resource_root, x) for x in data ]
      elif hasattr(self._atype, 'from_json_dict'):
        return self._atype.from_json_dict(data, resource_root)
      else:
        return data
docs: Parses the given JSON value into an appropriate python object.
  
      This means:
       - a datetime.datetime if 'atype' is datetime.datetime
       - a converted config dictionary or config list if 'atype' is ApiConfig
       - if the attr is an API list, an ApiList with instances of 'atype'
       - an instance of 'atype' if it has a 'from_json_dict' method
       - a python list with decoded versions of the member objects if the input
         is a python list.
       - the raw value otherwise