views:

26

answers:

0

Why is it possible to send in a WCF DataService the following JSON string:

{ SomeElement: 'val1', SomeOtherElement: 'val2' }

whilest you have to send in an normal WCF Service like

[OperationContract,
 WebInvoke (Method = "POST",
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped)]
public string SomeMehtod(string SomeElement, string SomeOtherElement)

the following JSON string

{ "SomeElement": "val1", "SomeOtherElement": "val2" }

This inconsistency is not clear to me. Why do I have to use double quotes in the normal web serive whilest I can omit the quotes for the element name in WCF data services?

Maybe somone knows an answer to this....