docs: def as_json(data, **kwargs):
      """Writes data as json.
  
      :param dict data: data to convert to json
      :param kwargs kwargs: kwargs for json dumps
      :return: json string
      :rtype: str
      """
  
      if 'sort_keys' not in kwargs:
          kwargs['sort_keys'] = False
      if 'ensure_ascii' not in kwargs:
          kwargs['ensure_ascii'] = False
  
      data = json.dumps(data, **kwargs)
  
      return data