openrasta/openrasta-stable — Issue #30: Issue with parsing json data into a GET method {}'s removed
Author: equinox2k
Created: 2012-03-01 10:04:34+00:00
State: open

It appears when passing in json data into a method the leading and trailing {}'s are removed and the data is still left url encoded. However if you insert a space before the passed in json data the {}'s are kept, but still url encoded.

using..

http://localhost:8002/Example?callback=updateCallback&url=http%3A%2F%2Flocalhost%3A8001%2FExample%2F12345&method=PUT&data=%7B+%22Name%22+%3A+%22pete%22+%7D&_=1330595296341

to something like...

[HttpOperation(HttpMethod.GET)]
public OperationResult Example(string callback, string method, string url, string data, string id)
{
}

the data param wil be...

+"Name"+,"pete"+

where the httpcontext querystring would correctly return { "Name" , "pete" }