Reputation: 23839
We have a web application providing a service using a simple REST interface (GET/POST methods) and returning results in JSON format.
A client wants to use the service from an ASP application (I assume ASP.NET) and asks for example code.
Is there any standard/widely-acceptable procedure for consuming JSON based web services from an ASP.NET application? I'm not familiar with the .NET framework, but can work my way through C#.
Any pointers are welcome.
Upvotes: 1
Views: 3060
Reputation: 119846
There's quite a few JSON libraries available for .NET that will convert JSON to POCO objects:
The json.org website has references to these libraries and more.
There's even support for Classic ASP (which is not the same as ASP.NET):
Upvotes: 1
Reputation: 3512
You can try using a library that already exists:
http://www.nateirwin.net/2008/11/20/json-array-to-c-using-jsonnet/
or you can build your own, something like this:
http://geekswithblogs.net/Mochalogic/articles/103330.aspx
JSON is fairly easy to work with though, so you should not have any issues.
Upvotes: 0