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 with ' (single quote) fails to convert to edn #7

Closed
Michieljoris opened this issue May 15, 2023 · 2 comments
Closed

json with ' (single quote) fails to convert to edn #7

Michieljoris opened this issue May 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Michieljoris
Copy link

{"foo": "ba'r"}

gives error:
zsh:1: unmatched "

This works fine on the command line:

~ » jet -i json -k                                                                                                                                                                                                                                                                               
{"foo": "ba'r"}
{:foo "ba'r"}

But echoing and piping fails:
echo '{"foo": "b'ar"}' | jet -i json -o edn

since the single quote ends the string in bash.

Something like this works though:
echo '{"foo": "b'\''ar"}' | jet -i json -o edn

where the single quote is replaced with '\'' (close string, escaped single quote, open string)

@ericdallo ericdallo added the bug Something isn't working label May 15, 2023
@ericdallo
Copy link
Owner

thanks for the report, I think escaping it liked you mentioned is probably the way to go here

@ericdallo
Copy link
Owner

Fixed on 1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants