I am trying to decode json data in yaws, getting an error which is not clear to identify the issue. The Json data is
{
"airport": [
{"airport": "MAA"},
{"city": "Chennai"},
{"country": "India"},
{"name": "Anna International Airport"}
]
}
The command i am using is
{ok, Json, _} = rfc4627:decode(Arg#arg.clidata).
The error is
Exception: undef Req: {http_request,'POST',{abs_path,"/sample/rest.yaws"},{1,1}} Stack: [{rfc4627,decode, [<<"{\n \"airport\": [\n {\"airport\": \"MAA\"},\n {\"city\": \"Chennai\"},\n {\"country\": \"India\"},\n {\"name\": \"Anna International Airport\"}\n ]\n}">>], []},