All,
I would like to extract OK from the following response:
{“status”:“OK”,“statustext”:“Switching the screen off”}
But I fail.
I found a very helpful site to check some approaches, but did not succeed.
With
val String response = transform("JSONPATH", "$.status", json)
the website above returns
“OK”.
Actually I have two issues:
-
I would like to get OK instead of “OK”
-
When I run the website from a browser, I get the response mentioned above:
{“status”:“OK”,“statustext”:“Switching the screen off”}
But when I execute it with curl I get something like:% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0^M 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0^M100 54 100 54 0 0 98 0 --:–:-- --:–:-- --:–:-- 98
{“status”:“OK”,“statustext”:“Switching the screen on”}
Anyone who could help me?