{"repo":"lidatong/dataclasses-json","free":true,"listed":false,"github":"https://github.com/lidatong/dataclasses-json","clone":"git clone https://github.com/lidatong/dataclasses-json.git","description":"Easily serialize Data Classes to and from JSON","language":"Python","stars":1486,"topics":["dataclasses","json","python"],"license":"MIT","category":"dev-tools","readme_excerpt":"Dataclasses JSON This library provides a simple API for encoding and decoding dataclasses to and from JSON. It's very easy to get started. README / Documentation website. Features a navigation bar and search functionality, and should mirror this README exactly -- take a look! Quickstart pip install dataclasses-json What if you want to work with camelCase JSON? Supported types It's recursive (see caveats below), so you can easily work with nested dataclasses. In addition to the supported types in the py to JSON table, this library supports the following: - any arbitrary Collection type is supported. Mapping types are encoded as JSON objects and str types as JSON strings. Any other Collection types are encoded into JSON arrays, but decoded into the original collection types. - datetime objects. datetime objects are encoded to float (JSON number) using timestamp. As specified in the datetime docs, if your datetime object is naive, it will assume your system local timezone when calling .timestamp() . JSON numbers corresponding to a datetime field in your dataclass are decoded into a datetime-aware object, with tzinfo set to your system local timezone. Thus, if you encode a datetime-naive object, you will decode into a datetime-aware object. This is important, because encoding and decoding won't strictly be inverses. See this section if you want to override this default behavior (for example, if you want to use ISO). - UUID objects. They are encoded as str (JSON string). - Decimal","default_branch":null,"files":null,"tree":[],"storefront":"/r/lidatong","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lidatong/dataclasses-json/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}