Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created July 24, 2018 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/0bb6f9548bd980413b27b016a1e759ca to your computer and use it in GitHub Desktop.
Save Fhernd/0bb6f9548bd980413b27b016a1e759ca to your computer and use it in GitHub Desktop.
Escribir y leer datos en formato JSON. OrtizOL.
import json
datos = {
'lenguaje': 'Python',
'version': '3.6.4',
'creator': 'Guido van Rossum'
}
cadena_json = json.dumps(datos)
print(cadena_json, type(cadena_json))
datos_json = json.loads(cadena_json)
print(datos_json, type(datos_json))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment