Skip to content

Instantly share code, notes, and snippets.

@barrachri
Last active November 8, 2019 20:14
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 barrachri/38bd626608daacd4a886fbf676f0d830 to your computer and use it in GitHub Desktop.
Save barrachri/38bd626608daacd4a886fbf676f0d830 to your computer and use it in GitHub Desktop.
Schema-less serializazion in Python
import pickle, json, msgpack
data = {"device_id": "499675491", "s_10": 10}
# using the pickle module
pickle.dumps(data)
# using the json module
json.dumps(data)
# using the msgpack library
msgpack.packb(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment