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

Expected ',' or '}' after property value in JSON at position 543 (line 23 column 7) #378

Closed
mirsella opened this issue Jan 21, 2024 · 4 comments

Comments

@mirsella
Copy link

hello !

curl http://localhost:3100/?url=https://www.lonelyplanet.fr/article/croatie-croisiere-entre-dubrovnik-mljet-et-korcula

{"error":1,"message":"Expected ',' or '}' after property value in JSON at position 543 (line 23 column 7)","data":null,"meta":{"service":"article-parser","lang":"javascript","server":"express","platform":"node"}}

The same happen with deno.

thanks !

@mirsella
Copy link
Author

same if using extractFromHtml on the body

@ndaidong
Copy link
Collaborator

@mirsella thank you for your notice. I've checked, the issue relates to extractLdSchema.js.

@andremacola this comes from #374, could you help to fix?

@andremacola
Copy link
Contributor

I'll send a fix as soon as I can this week. I took a quick look on my phone and apparently the issue is with the website's own jsonLD. It's poorly formatted, missing a comma in one of the items.

I think we'll need to put in a validator or, to simplify, a try\catch.

@ndaidong
Copy link
Collaborator

@andremacola thank you, if so I will add a simple try/catch now, please improve it when you are available.

ndaidong added a commit that referenced this issue Jan 22, 2024
- Fix error while parsing ldjson
- Update dependencies

Related issues: #378, #374, #373
@ndaidong ndaidong mentioned this issue Jan 22, 2024
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

No branches or pull requests

3 participants