Converting PHP serializer string to VB.net
Hey all i am trying to find (or come up) with some code that would allow me to decode the following string:
Code:
a:1:{i:0;a:9:{s:12:"model_number";s:8:"TTN037-7";s:5:"price";s:4:"2935";s:10:"unit_price";d:2405.32000000000016370904631912708282470703125;s:8:"id_price";d:2935;s:9:"sales_tax";d:223.68000000000000682121026329696178436279296875;s:5:"sales";d:2380.32000000000016370904631912708282470703125;s:7:"service";s:2:"25";s:7:"freight";s:3:"306";s:13:"comm_category";s:3:"X24";}}
It was made via PHP serializer. Using a PHP Unserializer online converter the above string comes out to be:
Code:
Array
(
[0] => Array
(
[model_number] => TTN037-7
[price] => 2935
[unit_price] => 2405.32
[id_price] => 2935
[sales_tax] => 223.68
[sales] => 2380.32
[service] => 25
[freight] => 306
[comm_category] => X24
)
)
Now i've been up and down on google to try to find a function or whatnot for VB.net to take care of this conversion but i have yet to find any!
It would be really great if someone could help me decode this using VB.net! :)
Thanks!
Re: Converting PHP serializer string to VB.net
That looks like a Dictionary list. I am not perfect with PHP, but I know enough. Have a look at this :
http://msdn.microsoft.com/en-us/library/xfhwa508.aspx
I hope it helps!