Load json without casting
It will avoid json stuff cast as string. It is a workaround for this https://github.com/ltworf/typedload/pull/140 But anyway cast is not needed so it is fine to disable it.
This commit is contained in:
parent
ea22350463
commit
ea1d5f9752
@ -89,7 +89,11 @@ class Relation:
|
|||||||
for row in loaded['content']:
|
for row in loaded['content']:
|
||||||
if len(row) != len(header):
|
if len(row) != len(header):
|
||||||
raise ValueError(f'Line {row} contains an incorrect amount of values')
|
raise ValueError(f'Line {row} contains an incorrect amount of values')
|
||||||
t_row: Tuple[Optional[Union[int, float, str, Rdate]], ...] = load(row, Tuple[Optional[Union[int, float, str, Rdate]], ...]) # type: ignore
|
t_row: Tuple[Optional[Union[int, float, str, Rdate]], ...] = load(
|
||||||
|
row,
|
||||||
|
Tuple[Optional[Union[int, float, str, Rdate]], ...], # type: ignore
|
||||||
|
basiccast=False
|
||||||
|
)
|
||||||
content.append(t_row)
|
content.append(t_row)
|
||||||
return Relation(header, frozenset(content))
|
return Relation(header, frozenset(content))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user