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 like queries fail for KeywordsVocabulary #284

Open
szakitibi opened this issue Jun 25, 2024 · 0 comments
Open

JSON like queries fail for KeywordsVocabulary #284

szakitibi opened this issue Jun 25, 2024 · 0 comments

Comments

@szakitibi
Copy link

szakitibi commented Jun 25, 2024

The json like query strings ([test] or {test}) doomed to fail for KeywordsVocabulary, due to the use of _parseJSON:

def _parseJSON(s):
# XXX this should be changed to a try loads except return s
if isinstance(s, str):
s = s.strip()
if (s.startswith("{") and s.endswith("}")) or (
s.startswith("[") and s.endswith("]")
): # detect if json
return json_loads(s)
return s

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

1 participant