code: def export_as_json(self):
          
          return {
              "items": {
                  str(jid): item.export_as_json()
                  for jid, item in self.items.items()
              },
              "ver": self.version
          }
docs: Export the whole roster as currently stored on the client side into a
          JSON-compatible dictionary and return that dictionary.