title: Object of type 'dict_items' is not JSON serializable
body: <p>How could I save a dict_item to a json file to load it in another place?
  I am getting the list with js in my browser and returning into python, but I cannot save it as a Json file because it says:</p>
  
  <blockquote>
    <p>Object of type 'dict_items' is not JSON serializable</p>
  </blockquote>
  
  <h3>Javascript to extract the list:</h3>
  
  <pre><code>var items = {}, ls = window.localStorage;
  for (var i = 0, k; i &lt; ls.length; i++)
     items[k = ls.key(i)] = ls.getItem(k);
  return items;
  </code></pre>
  
  <h3>Stacktrace:</h3>
  
  <pre><code>Traceback (most recent call last):
    File "tester.py", line 9, in &lt;module&gt;
      obj.store()
    File "F:\project\zw\zwp.py", line 69, in store
      json.dump(session_ls, fp)
    File "c:\users\dkun\appdata\local\programs\python\python36\Lib\json\__init__.py", line 179, in dump
      for chunk in iterable:
    File "c:\users\dkun\appdata\local\programs\python\python36\Lib\json\encoder.py", line 437, in _iterencode
      o = _default(o)
    File "c:\users\dkun\appdata\local\programs\python\python36\Lib\json\encoder.py", line 180, in default
      o.__class__.__name__)
  TypeError: Object of type 'dict_items' is not JSON serializable
  </code></pre>
  
  <h3>Code to store the data:</h3>
  
  <pre><code>storage = LocalStorage(self.driver)
  session_ls = storage.get().items()
  with open('../assets/tmp/session.json', 'w') as fp:
      json.dump(session_ls, fp)
  </code></pre>
  
  <h3>Content if I run:</h3>
  
  <pre><code>print(repr(session_ls))
  
  dict_items([('Dexie.DatabaseNames', '["wawc"]'), ('Gds7Zz7akA==', 'false'), ('BrowserId', '"A=="'), ('LangPref', '"en"'), ('SecretBundle', '{"key":"X=","encKey":"X","macKey":"X="}'), ('Token1', '"Y="'), ('Token2', '"1=="'), ('Y==', 'false'), ('debugCursor', '263'), ('l==', '[{"id":"global_mute","expiration":0}]'), ('logout-token', '"1=="'), , ('remember-me', 'true'), ('storage_test', 'storage_test'), ('==', 'false'), ('mutex', '"x19483229:init_15"')])
  </code></pre>