79138282

Date: 2024-10-29 17:16:13
Score: 0.5
Natty:
Report link

As @milovan-tomašević said:

It is possible that the solution with dataclasses-json makes the code more readable and cleaner.

pip install dataclasses-json

In addition, they say What if you want to work with camelCase JSON?

In case of camelCase JSON you can specify:

from dataclasses import dataclass
from dataclasses_json import dataclass_json, LetterCase

@dataclass
@dataclass_json(letter_case=LetterCase.CAMEL)
class Foo:
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @milovan-tomašević
Posted by: Plap