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

Forward slash escaping #29

Open
franck93 opened this issue Aug 19, 2014 · 2 comments
Open

Forward slash escaping #29

franck93 opened this issue Aug 19, 2014 · 2 comments

Comments

@franck93
Copy link

Hi all,

Jettison escapes forward slashes by default. JSON does not mandate forward slashes to be escaped. But escaping forward slahes is perfectly valid.
Using json.sh, when I try to parse JSON payloads that contain escaped forward slahes (/) I encounter issues.
Does json.sh handle escaped forward slashes?
Payload example

{
"ressources": {
"statut": "http://localhost:8080/mapb-abl-dua/batch/179/statut" }
}

Any help would be much appreciated.

@dominictarr
Copy link
Owner

I get this output:

> echo '{"ressources": {"statut": "http:\/\/localhost:8080\/mapb-abl-dua\/batch\/179\/statut" }}' | ./JSON.sh 
["ressources","statut"] "http:\/\/localhost:8080\/mapb-abl-dua\/batch\/179\/statut"
["ressources"]  {"statut":"http:\/\/localhost:8080\/mapb-abl-dua\/batch\/179\/statut"}
[]      {"ressources":{"statut":"http:\/\/localhost:8080\/mapb-abl-dua\/batch\/179\/statut"}}

which looks correct to me. what output did you get and what where you expecting?

@zaa
Copy link
Contributor

zaa commented Nov 19, 2014

Changes from #30 should help with the issue.

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