Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    Of course you can guarantee that the json is conformant to the contract. Only if you don't have control of the client could you not be able to control it. If you don't have control of the client then it is probably outside the domain of your service and the point is moot. I don't see the problem. All the workarounds I see are futile and will just add pain. Read the specs on DataContract/DataMember and follow them. 2 pesos. Commented Feb 19, 2010 at 18:08
  • 1
    You're right. Technically, I could write it into the JS before the info gets sent. And, I hinted in a different comment that this is probably what I will do in the end. Though, I would like a service to be able to handle an arbitrary number of fields that are not necessarily known beforehand. Does that make sense? I just want a service that can accept a completely arbitrary list of "key": "value" pairs and then decide what do do with them without having to know the "key" names beforehand. Commented Feb 19, 2010 at 21:30