zzy
zzy

Reputation: 1793

What's the format of this data?

Here is the data:

a:6:
{
    s:8:"post_num";i:10476;
    s:8:"good_num";i:1;
    s:12:"manager_info";a:2:{
        s:7:"manager";a:2:{
            s:10:"forum_list";a:0:{
            }
            s:5:"count";i:0;
        }
        s:6:"assist";a:2:{
            s:10:"forum_list";a:2:{
                i:0;s:4:"sdsd";
                i:1;s:6:"xxxxxx";
            }
            s:5:"count";i:2;
        }
    }
    s:10:"like_forum";a:5:{
        i:12;a:2:{
            s:10:"forum_list";a:1:{
                i:0;s:4:"xxxx";
            }
            s:5:"count";i:1;
        }
        i:11;a:2:{
            s:10:"forum_list";a:2:{
                i:0;s:8:"xxxxxxxx";
                i:1;s:8:"xxxxxxxx";
            }
            s:5:"count";i:8;
        }
        i:10;a:2:{
            s:10:"forum_list";
            a:1:{
                i:0;s:6:"kindle";
            }
            s:5:"count";i:1;
        }
        i:9;a:2:{
            s:10:"forum_list";a:1:{
                i:0;s:3:"psv";
            }
            s:5:"count";i:1;
        }
        i:7;a:2:{
            s:10:"forum_list";a:1:{
                i:0;s:3:"eve";
            }
            s:5:"count";i:1;
        }
    }
    s:9:"is_novice";i:0;
    s:7:"op_time";i:1429690795;
}

After I format it like this , I found :

  1. a is object
  2. s is string
  3. i is int
  4. The number after the char above is length, a:6 means the object has 6 children.

So I want to convert it into java bean , I can write code to parse it, but I'm wondering whether it is a existing data format ? If so I can use more reliable third-part library's code.

Upvotes: 0

Views: 188

Answers (1)

findall
findall

Reputation: 2193

It is serialized data of PHP objects/values, in the PHP serialization format.

For more detail, see http://www.phpinternalsbook.com/classes_objects/serialization.html

Upvotes: 1

Related Questions