title: Python to JavaScript object graph (de)serialization
body: <p>I'm trying to send an object graph from Python to JavaScript running in a browser, and I was wondering whether there is a pair of ready-to-use libraries for handling serialization on the Python side and deserialization on the JavaScript side. JSON does not support object references out of the box, the docs for JS-YAML say it's not production-ready in a browser environment, and I didn't find anything for XML. Any suggestions?</p>
  
  <p><strong>edit:</strong> Here's an example for what I mean by "JSON does not support object references out of the box": I have a shop database with products and orders and a many-to-many relationship between them. If I put a bunch of orders into the Python JSON serializer, the result will contain multiple serializations (copies) of each product, because the JSON serializer has no way of saying, "I've serialized this product already, so I'll just insert a reference to it". So I put the result on the wire and deserialize it on the client, and now I have multiple JavaScript objects representing the same product, which is bad.</p>