Skip to content

Commit

Permalink
do not use orjson to parse dataset version preview (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Nov 29, 2024
1 parent 08f4625 commit be41789
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/datachain/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
)
from urllib.parse import urlparse

import orjson

from datachain.error import DatasetVersionNotFoundError
from datachain.sql.types import NAME_TYPES_MAPPING, SQLType

Expand Down Expand Up @@ -266,7 +264,7 @@ def serialized_schema(self) -> dict[str, Any]:
@cached_property
def preview(self) -> Optional[list[dict]]:
if isinstance(self._preview_data, str):
return orjson.loads(self._preview_data)
return json.loads(self._preview_data)
return self._preview_data if self._preview_data else None

@classmethod
Expand Down

0 comments on commit be41789

Please sign in to comment.