Unexpected token JSON
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
Hi, Guys!
I have an issue with query like this:
SELECT i.*,
array_agg(m.name) as motifs,
array_agg(m.global_art_style) as global_art_style,
array_agg(m.styles) as styles
FROM public."Location" as i
LEFT JOIN public."Motif" AS m ON m.location = i.id
WHERE 1=1
GROUP BY i.id
ORDER BY id ASC
Inside array_agg fields I have text with possible NULL values, it is fine in PgAdmin and I see just NULL values, but with your library the query is failed with error:
Unexpected token N in JSON at position 0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Reproduce the shown PostgreSQL query through Postgres.js and trace how array_agg results containing NULL are decoded; the expected handling of those values needs clarification before a completion check can be defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100