Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
# Encoding Python dictionary to JSON string
data = {"name": "Johnny", "last_name": "Silverhand", "age": 34, "city": "Night City"}
json_string = json.dumps(data)
printlogger.info(json_string)

# Decoding JSON string back to Python dictionary
decoded_data = json.loads(json_string)
printlogger.info(decoded_data)

pipy package → None (python bundle library)