Menu

#4 Mismatch

v1.0_(example)
open
nobody
5
2015-10-14
2015-10-14
No

Hello!

I tried to use your lib, and it works perfectly. Just one issue: if you will try to deserialize some string and serialize it back - it may be not the same.

The main issue is in the order of hash keys: the used C# Hashtable does not store order, but order may be important for PHP app.

Here is the sample:

            var s = new PhpSerializer();
            var origin = "";

            origin = @"a:4:{i:0;s:5:""/home"";i:1;s:2:""12"";i:2;s:5:""apple"";i:3;a:4:{s:4:""Mike"";i:12;s:4:""John"";i:79;s:5:""Tonya"";i:-3;s:4:""Anna"";s:5:""smoke"";}}";
            Assert.AreEqual(origin, s.Serialize(s.Deserialize(origin)));

I have attached my solution, plz, review it :)

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.