code: def _PrintStorageInformationAsJSON(self, storage_reader):
      
      serializer = json_serializer.JSONAttributeContainerSerializer
      storage_counters = self._CalculateStorageCounters(storage_reader)
      storage_counters_json = json.dumps(storage_counters)
      self._output_writer.Write('{')
      self._output_writer.Write('"storage_counters": {0:s}'.format(
          storage_counters_json))
      self._output_writer.Write(',\n')
      self._output_writer.Write(' "sessions": {')
      for index, session in enumerate(storage_reader.GetSessions()):
        json_string = serializer.WriteSerialized(session)
        if index != 0:
          self._output_writer.Write(',\n')
        self._output_writer.Write('"session_{0:s}": {1:s} '.format(
            session.identifier, json_string))
      self._output_writer.Write('}}')
docs: Writes a summary of sessions as machine-readable JSON.
  
      Args:
        storage_reader (StorageReader): storage reader.