Skip to content

Fix seed script to parse NDJSON format data file - #14

Open
michaelcolenso wants to merge 1 commit into
masterfrom
claude/clarify-task-shVqt
Open

michaelcolenso wants to merge 1 commit into
masterfrom
claude/clarify-task-shVqt

Conversation

@michaelcolenso

Copy link
Copy Markdown
Owner

The data file (id_county_item.json) contains newline-delimited JSON
(one JSON object per line), but the seed script was calling JSON.parse()
on the entire file contents, which fails because it's not valid JSON as
a whole. Split by newlines and parse each line individually.

https://claude.ai/code/session_01MGJ4Yh1BQm4i3ofBFfyWMq

The data file (id_county_item.json) contains newline-delimited JSON
(one JSON object per line), but the seed script was calling JSON.parse()
on the entire file contents, which fails because it's not valid JSON as
a whole. Split by newlines and parse each line individually.

https://claude.ai/code/session_01MGJ4Yh1BQm4i3ofBFfyWMq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants