开发者

How to unserialize PHP Serialized array/variable/class and return suitable object in C#

开发者 https://www.devze.com 2022-12-14 16:35 出处:网络
The goal is to unserialize a PHP serialized string and get sutable object in C# Is there any way to make this possible in C#(.Net)?

The goal is to unserialize a PHP serialized string and get sutable object in C#

Is there any way to make this possible in C#(.Net)?

To be more specific: We need to make an application which comunicates (Via HTTP) to specific website which returns the needed information. Fortunately/unfortunately we dont have permission to website so the data (array mostly) that is returned开发者_StackOverflow中文版 from website is PHP serialized.


I suppose using JSON as an intermediary step could be useful.


You should probably write it to XML or JSON. You can construct your C# object back from the XML

Edit: Looks like there is already a XML serializer for PHP

0

精彩评论

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

关注公众号