Skip to content

JSON.SET is not accepting strings as values #1289

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

Open
kurtisane opened this issue Oct 28, 2024 · 1 comment
Open

JSON.SET is not accepting strings as values #1289

kurtisane opened this issue Oct 28, 2024 · 1 comment
Labels

Comments

@kurtisane
Copy link

Redis Stack INFO :
redis_version:6.2.14
module:name=ReJSON,ver=20409,api=1,filters=0,usedby=[search|graph],using=[],options=[handle-io-errors]
module:name=timeseries,ver=10814,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors]
module:name=graph,ver=21012,api=1,filters=0,usedby=[],using=[ReJSON],options=[]
module:name=search,ver=20620,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors]
module:name=bf,ver=20409,api=1,filters=0,usedby=[],using=[],options=[]

When running commands like this :
JSON.SET "ReportSession:8836e5ed-1136-440e-9a27-52e86d4449db" $.InstituteIds "50asd"
Only the integer 50 is stored in the JSON for some odd reason.

When runnign commands like this :
JSON.SET "ReportSession:8836e5ed-1136-440e-9a27-52e86d4449db" $.InstituteIds "a50asd"
I get a error "expected value at line 1 column 1" and the String is not stored.

I checked the documentation and there is no command for strings.

@ephraimfeldblum
Copy link
Collaborator

Strings need their own dedicated ". It should either be escaped as in "\"a50asd\"", or the outer delimiter should be ' as in '"a50asd"'.

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

No branches or pull requests

3 participants