I have a problem with pattern match of json formatted string. Here I add a shorted version (just changed long json string to "{\"jsondata\"}" So i have this pattern match which is sucessfull:
> MyData2={ok,{{"HTTP/1.1",200,"OK"},
[{"connection","Keep-Alive"},
{"date","Thu, 10 Sep 2015 12:03:49 GMT"},
{"server","Apache/2.4.7 (Ubuntu)"},
{"vary","X-Auth-Token"},
{"content-length","1171"},
{"content-type","application/json"},
{"x-openstack-request-id",
"req-31b4efc1-2af4-4130-b7a8-01d94b456096"},
{"keep-alive","timeout=5, max=100"}],
"{\"jsondata\"}"}}.
After that I run the following:
> {ok,{{"HTTP/1.1",ReturnCode, State},B,J}}=MyData2.
unfortunatelly i get
If I change "{\"jsondata\"}"
to "jsondata"
the last pattern match works fine
I have no Idea how to extract the json and get in J the "{\"jsondata\"}"
I`ll appriciate any idea
** exception error: no match of right hand side value