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

JSON-LD: Use UltraJSON if available #49

Open
redapple opened this issue Jun 13, 2017 · 1 comment · May be fixed by #69
Open

JSON-LD: Use UltraJSON if available #49

redapple opened this issue Jun 13, 2017 · 1 comment · May be fixed by #69

Comments

@redapple
Copy link
Contributor

Motivation: #37 (comment)

@petri
Copy link

petri commented Aug 31, 2022

If you were to use something else than the built-in json for parsing, you'd probably want to also change https://github.com/scrapinghub/extruct/blob/master/extruct/jsonld.py#L38 that uses built-in json behind the scenes.

You could use the comment-removal dispose function from jstyleson directly for that.

Or, use https://pypi.org/project/nojsoncomments/ that uses the exact same logic for comment removal but is over twice as fast. The use case is somewhat marginal of course, so the typical real benefit is not big despite speed increase and it's a Cython extension so someone would have to provide Windows & Linux wheels (I'm on a Mac).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants