docs: def json_export(self, dest, fieldnames=None, encoding="UTF-8"):
          """Exports the contents of the table to a JSON-formatted file.
             @param dest: output file - if a string is given, the file with that name will be 
                 opened, written, and closed; if a file object is given, then that object 
                 will be written as-is, and left for the caller to be closed.
             @type dest: string or file
             @param fieldnames: attribute names to be exported; can be given as a single
                 string with space-delimited names, or as a list of attribute names
             @type fieldnames: list of strings
             @param encoding: string (default="UTF-8"); if csv_dest is provided as a string
                 representing an output filename, an encoding argument can be provided (Python 3 only)
             @type encoding: string
          """
          close_on_exit = False
          if isinstance(dest, basestring):
              if PY_3:
                  dest = open(dest, 'w', encoding=encoding)
              else:
                  dest = open(dest, 'w')
              close_on_exit = True
          try:
              if isinstance(fieldnames, basestring):
                  fieldnames = fieldnames.split()
  
              if fieldnames is None:
                  do_all(dest.write(_to_json(o)+'\n') for o in self.obs)
              else:
                  do_all(dest.write(json.dumps(ODict((f, getattr(o, f)) for f in fieldnames))+'\n') for o in self.obs)
          finally:
              if close_on_exit:
                  dest.close()