Closed MickaelBergem closed 8 months ago
Hello there 👋
This is my first contribution to this project, let me know if some information is missing :)
Please sync with main and I'll merge :)
@george-zubrienko thanks! I've rebased the PR on the latest commit from master
.
I don't know if this is related to this issue but when serializing object with dataclasses-json==0.6.2 I get new key "dataclass_json_config": null, which ruins my serialization and was not present in version 0.6.1 We didn't chage code for serialziation in any way and after using this version this issue appeared. Here is just example how it looks like
with _dataclasses-json==0.6.2_ -->
{
"name": "DemoPro*****",
"version": "v2_****",
"poList": [
{
.....
{
_**"dataclass_json_config": null,**_
"name": "S_CAN*******",
.....
}
],
....
with _dataclasses-json==0.6.1_ -->
{
"name": "DemoPro*****",
"version": "v2_****",
"poList": [
{
.....
{
"name": "S_CAN*******",
.....
}
],
....
I reverted the change dataclass_json_config: Optional[dict] = None to dataclass_json_config = None and now I don't get this extra key.
I don't know if this is related to this issue but when serializing object with dataclasses-json==0.6.2 I get new key "dataclass_json_config": null, which ruins my serialization and was not present in version 0.6.1
We didn't chage code for serialziation in any way and after using this version this issue appeared. Here is just example how it looks like
with _dataclasses-json==0.6.2_ --> { "name": "DemoPro*****", "version": "v2_****", "poList": [ { ..... { _**"dataclass_json_config": null,**_ "name": "S_CAN*******", ..... } ], .... with _dataclasses-json==0.6.1_ --> { "name": "DemoPro*****", "version": "v2_****", "poList": [ { ..... { "name": "S_CAN*******", ..... } ], ....
I reverted the change
dataclass_json_config: Optional[dict] = None to dataclass_json_config = None
and now I don't get this extra key.
@navimac can you raise an issue? Looks like a regression to me, will take a look
Given our code:
Running mypy yields the following error:
The type is "defined as None" because no explicit type is given when initializing the variable.
This PR provides the correct explicit type for
dataclass_json_config
.