Simon Willison’s Weblog

Subscribe
Atom feed for serialization

3 items tagged “serialization”

2020

Better Python Object Serialization. TIL about functions.singledispatch, a decorator which makes it easy to create Python functions with implementations that vary based on the type of their arguments and which can have additional implementations registered after the fact—great for things like custom JSON serialization.

# 7th January 2020, 8:35 pm / functional-programming, json, python, serialization

2010

The MessagePack Project. A cross-language efficient binary-based serialization library—“It’s like JSON, but very fast and small”. Claims to outperform protocol buffers for at least some benchmarks.

# 21st April 2010, 10:55 pm / json, messagepack, protocolbuffers, serialization

2009

JsonML (JSON Markup Language). An almost non-lossy serialization format for sending XML as JSON (plain text in between elements is ignored). Uses the (element-name, attribute-dictionary, list-of-children) tuple format, which sadly means many common cases end up taking more bytes than the original XML. Still an improvement on serializations that behave differently when a list of children has only one item in it.

# 10th February 2009, 3:03 pm / json, jsonml, serialization, xml