0

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.

2 Answers 2

3

It looks like the output from serialize http://php.net/manual/en/function.serialize.php, check out http://developer.yahoo.com/php/phpserial.html

Sign up to request clarification or add additional context in comments.

1 Comment

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.