code: def ToJson(self):
          
          items = []
  
          for i in self.Items:
              items.append({'index': i.index, 'height': i.height})
  
          return {
              'version': self.StateVersion,
              'txHash': self.TransactionHash.ToString(),
              'txHeight': self.TransactionHeight,
              'items': items
          }
docs: Convert object members to a dictionary that can be parsed as JSON.
  
          Returns:
               dict: