开发者

Sending data from a PHP script to a C# applicaiton

开发者 https://www.devze.com 2022-12-28 06:59 出处:网络
When C# app is ran, it POSTS a request to the PHP server, which wants to return an array.What\'s an easy way to load this array\'s contents into C# for using with there.

When C# app is ran, it POSTS a request to the PHP server, which wants to return an array. What's an easy way to load this array's contents into C# for using with there.

For clarification, this array is a PHP stdClass object that contains strings, floats, an开发者_Python百科d other stdClass objects. I want to get a similar data structure on the C# end with the same data.

Also, I know stdClass != arrays, but they're pretty simular so that they can be encoded the same way witn most encoding mechanisms.


I don't know C# but JSON encoding using json_encode() is pretty popular in the web app world as a simple means to transfer simple structures across platforms.

There is a variety of parser classes on the C# end, scroll down in the first link.

0

精彩评论

暂无评论...
验证码 换一张
取 消