Python library for converting object into dictionary/list structures and json