Skip to content

Commit

Permalink
Use util methods to SerDe to and from SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jul 12, 2024
1 parent dc5c7a1 commit 3f29a1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions singer_sdk/connectors/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
import sqlalchemy as sa

from singer_sdk import typing as th
from singer_sdk._singerlib import CatalogEntry, MetadataMapping, Schema, serde
from singer_sdk._singerlib import CatalogEntry, MetadataMapping, Schema
from singer_sdk.exceptions import ConfigValidationError
from singer_sdk.helpers._util import dump_json, load_json
from singer_sdk.helpers.capabilities import TargetLoadMethods

if t.TYPE_CHECKING:
Expand Down Expand Up @@ -1164,7 +1165,7 @@ def serialize_json(self, obj: object) -> str: # noqa: PLR6301
.. versionadded:: 0.31.0
"""
return serde.serialize_json(obj)
return dump_json(obj)

def deserialize_json(self, json_str: str) -> object: # noqa: PLR6301
"""Deserialize a JSON string to an object.
Expand All @@ -1180,7 +1181,7 @@ def deserialize_json(self, json_str: str) -> object: # noqa: PLR6301
.. versionadded:: 0.31.0
"""
return serde.deserialize_json(json_str)
return load_json(json_str)

def delete_old_versions(
self,
Expand Down

0 comments on commit 3f29a1f

Please sign in to comment.