Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Last active September 12, 2022 12:46
Show Gist options
  • Select an option

  • Save narenaryan/271c9284ccf93d8603479234bfd5c8d9 to your computer and use it in GitHub Desktop.

Select an option

Save narenaryan/271c9284ccf93d8603479234bfd5c8d9 to your computer and use it in GitHub Desktop.
Helper snippet for JSON article on medium
import json
# JSON string
foo = "[1, 2, 3]"
# Decoded result
result = json.loads(foo)
print(result) # prints [1, 2, 3]
print(type(result)) # prints <class 'list'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment