My iPhone app communicates with a RESTful service that provides JSON output. I've been generating JSON using mainly PHP. If I use a .NET web service or WCF service, will there be any limitations or differences I should be aware of in regards to JSON as input/output for the service? I'm not sure what to expect from .NET in this regard.
+1
A:
One thing I noticed: .NET emits DateTime objects as
\/Date(xxxx)\/
where xxx is the number of seconds or whatever. I had to eval that on the JAvascript side to get it to become an actual date.
Cheeso
2010-01-18 22:34:34
Thanks. Other than the date, you believe there probably isn't much to be concerned about?
2010-01-18 22:51:01
JSON is just JSON, right? Have you ever written a WCF service? That's probably the biggest hurdle.
Cheeso
2010-01-18 23:26:56
see this example for a good start on a basic WCF service that emits JSONhttp://stackoverflow.com/questions/2086666/wcf-how-do-i-return-clean-json/
Cheeso
2010-01-18 23:44:55
Thanks. That's a very good resource. Do you know of any issues on the input side? Meaning, am I OK to send JSON to the WCF service without having to do anything special?
2010-01-19 04:30:06
No special requirements on the input side. You can send complex objects to WCF, too. For some suggestions on that, see this answer: http://stackoverflow.com/questions/2062053/passing-complex-objects-into-a-wcf-rest-service/2062143#2062143
Cheeso
2010-01-19 05:03:15