#valid JSON marked invalid

6 messages · Page 1 of 1 (latest)

regal merlin
#

I get this warning in Prisma Studio on a Postgres source. The content is valid JSON though.

Here's the JSON anyway:
{
"author": "jbae3",
"created_at": "2023-11-01T15:39:44.000Z",
"created_at_i": 1698853184,
"id": 38099754,
"options": [],
"parent_id": 38099086,
"points": null,
"story_id": 38099086,
"text": "Contextual AI | Onsite/Flexible Hours | Mountain View, CA | Full-time | Product Engineer & AI Solutions Engineer<p>At Contextual AI, we are building the next generation of LLMs, from first principles, specifically for enterprise use cases.<p>We have 2 roles we’re hiring for:<p>-Product Engineer<p>-AI Solutions Engineer<p>For the Product Engineer position, we're looking for someone with strong full-stack engineering skills and can learn quickly.<p>For the Solutions Engineer position, we’re looking for the same profile as the Product Engineer, but with strong communication skills and customer obsession since this will be a client facing role.<p>Apply here for the Product Engineer: <a href="https://boards.greenhouse.io/contextualai/jobs/4097375007" rel="nofollow noreferrer">https://boards.greenhouse.io/contextualai/jobs/4097375007</a><p>Apply here for the AI Solutions Engineer: <a href="https://boards.greenhouse.io/contextualai/jobs/4084765007" rel="nofollow noreferrer">https://boards.greenhouse.io/contextualai/jobs/4084765007</a><p>Email any questions: [email protected]",
"title": null,
"type": "comment",
"url": null
}

#

Column is JSONB

#

hnPost Json @db.JsonB

#

All rows are marked invalid also

dark turtle
#

Thanks for sharing the JSON & the warning! Are the quotes in the value of the text property escaped in some way? I see some " characters in those URLs that'd make this JSON not valid

regal merlin
#

Yeah that's true. When I click on the field in Studio the escaped backslashes disappear, however before I click they're there. And in inspector too. And in TablePlus. Also, I'm not 100% but I don't think Postgres would allow the inner double quotes in that column type.

All other aspects are working fine. Just the display of this in Studio. Not a big deal but think it's probably a bug in studio.