[python] How to dynamically build a JSON object with Python?