jethroo jethroo - 6 months ago 45
Ruby Question

ruby gem for parsing serialized PHP-array?

i'm consuming a SOAP webservice with savon v2 and within the response a get a serialized PHP-array which i need to parse in.

is there a ruby or rails gem providing this feature?

the php array string looks like this:

"a:5:{s:4:\"link\";s:88:\"https://www.12345.de/kundenmeinung.php?kunde=a2ca9498f6f7695aa518d6d6ed9fec7b&shop=12345\";s:4:\"hash\";s:32:\"a2ca9498f6f7695aa518d6d6ed9fec7b\";s:11:\"known_since\";s:0:\"\";s:4:\"done\";i:1;s:7:\"done_at\";i:1358413353;}"


regards

Carsten

Answer
# gem search -r php|grep serial

php-serial (0.9.5)
php-serialization (0.5.3)
php-serialize (1.1.0)
php-serialize4ruby (0.0.0)
php-serialize_ryan (1.1.1)
php_serialize (1.2)
viva-php_serialize (1.1.3)

so there's at least 7 of them.