Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summarize API returns json column content as string #1215

Closed
kostasb opened this issue Oct 10, 2023 · 0 comments · Fixed by #1217
Closed

Summarize API returns json column content as string #1215

kostasb opened this issue Oct 10, 2023 · 0 comments · Fixed by #1217
Assignees
Labels
bug Something isn't working needs-triage

Comments

@kostasb
Copy link
Contributor

kostasb commented Oct 10, 2023

Describe the bug:
The summarize call outputs json column content as string instead of json.
Tested with client version: 0.26.7

Repro:
Where "myjson" is a column of type json:

const rec = await xata.db.games.read("rec_ck6m8s0tr08hl26rt2m0");
console.log(rec.myjson);

//response:
{
  "one": "content",
  "two": "content2"
}
const summary = await xata.db.games.summarize({
  columns: ["myjson"],
  summaries: {},
});

console.log(summary.summaries[0].myjson);

//response:
"{\"one\":\"content\",\"two\":\"content2\"}"

Reported on Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants