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.
master
Salvo 'LtWorf' Tomaselli 2020-08-26 21:16:36 +07:00
parent ea22350463
commit ea1d5f9752
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 5 additions and 1 deletions

@ -89,7 +89,11 @@ class Relation:
for row in loaded['content']:
if len(row) != len(header):
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)
return Relation(header, frozenset(content))