code: def _dump_json(self, data, new_line=False):
          
  
          # We do not want any spaces between keys and values in JSON
          json_data = json.dumps(data, separators=(',', ':'))
  
          if new_line:
              json_data = "%s\n" % json_data
  
          # Generate sha256sum of the JSON data, may be handy
          sha = hashlib.sha256(json_data.encode('utf-8')).hexdigest()
  
          return json_data, sha
docs: Helper function to marshal object into JSON string.
          Additionally a sha256sum of the created JSON string is generated.