Skip to content

Commit

Permalink
feat: use streaming encoding in json serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Dec 3, 2024
1 parent 8fac84f commit 4b04cbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/collection/utils/serialize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class JsonSerializer(StreamingSerializer[str, types.TDataCollection]):
def stream(self):
visible = self.attached.columns.visible

yield self.encoder.encode(
chunks = self.encoder.iterencode(
[
{
k: v
Expand All @@ -308,6 +308,7 @@ def stream(self):
for row in self.attached.data
],
)
yield from chunks


class ChartJsSerializer(StreamingSerializer[str, types.TDataCollection]):
Expand Down

0 comments on commit 4b04cbc

Please sign in to comment.