I am using C# to connect to a web service written in PHP, the issue I am having is how to go about parsing this format that is returned for a few of the calls.
a:2:{i:0;a:6:{s:5:"label";s:13:"Delivery Date";s:5:"value";s:19:"2010-11-08 00:00:00";s:4:"code";s:13:"delivery_date";s:4:"type";s:4:"date";s:6:"rawval";s:19:"2010-11-08 00:00:00";s:2:"id";s:3:"119";}i:1;a:6:{s:5:"label";s:14:"Enclosure Card";s:5:"value";s:9:"Test card";s:4:"code";s:14:"enclosure_card";s:4:"type";s:8:"textarea";s:6:"rawval";s:9:"Test card";s:2:"id";s:3:"118";}}
I understand that the above represents an array with various key value pairs inside, but what I am wondering is if the above format has a specific name and if there is a C# parser out there somewhere for this.
I would assume:
a:2 would represent an array with 2 elements. i:0 would represent an integer (0). s:5 would represent a string of length 5 and contents "label"
This may be serialized.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.