This is my first stack overflow post so cut me some slack :).
I have been struggling quite a while now with this issue.
Currently my WCF reads data from a database and returns it as JSON.
This is how it looks:
{
"shoppinglistitemsResult": [
{
"description": "this is my notes description",
"name": "mynotename",
"pid": "1",
"status": "1",
"username": "test"
}
]
}
I want it to look like this:
{
"shoppinglistitemsResult": [
{
"description": "123",
"name": "123",
"pid": "123",
"status": "123",
"username": "test"
}
],
"success": 1
}
With the extra object at the end.
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "displayAllNotes?name={username}&pass={password}")]
List<Service1.wsNotes> shoppinglistitems(string username, string password);