Home > database >  Pb how to achieve the deserialization of serialized data
Pb how to achieve the deserialization of serialized data

Time:09-15

Consult everybody, there is a PHP software, database has the following serialized data:
A: 13: {s: 6: "examid"; S: 1: "1"; S: 11: "examsubject"; S: 1: "1"; S: 4: "exam"; S: 18: "recent history class test"; S: 11: "examsetting"; A: 5: {s: 8: "examtime"; I: 90; S: 7: "comfrom"; S: 0: ""; S: 5: "score"; I: 100; S: 9: "passscore"; I: 60; S: 8: "questype"; A: 5: {I: 1; A: 6: {s: 6: "number". I: 20; S: 5: "score"; I: 1; S: 8: "describe"; S: 0: ""; S: 10: "easynumber"; I: 30; S: 12: "middlenumber"; S: 1: "0"; S: 10: "hardnumber"; S: 1: "0"; } I: 2; A: 6: {s: 6: "number". I: 15. S: 5: "score"; I: 2; S: 8: "describe"; S: 0: ""; S: 10: "easynumber"; I: 15. S: 12: "middlenumber"; S: 1: "0"; S: 10: "hardnumber"; S: 1: "0"; } I: 3; A: 6: {s: 6: "number". I: 20; S: 5: "score"; I: 2; S: 8: "describe"; S: 0: ""; S: 10: "easynumber"; I: 20; S: 12: "middlenumber"; S: 1: "0"; S: 10: "hardnumber"; S: 1: "0"; } I: 4; A: 6: {s: 6: "number". I: 1; S: 5: "score"; I: 10; S: 8: "describe"; S: 1: "0"; S: 10: "easynumber"; S: 1: "0"; S: 12: "middlenumber"; S: 1: "0"; S: 10: "hardnumber"; I: 1; } I: 5; A: 6: {s: 6: "number". S: 1: "0"; S: 5: "score"; S: 1: "0"; S: 8: "describe"; S: 1: "0"; S: 10: "easynumber"; S: 1: "0"; S: 12: "middlenumber"; S: 1: "0"; S: 10: "hardnumber"; S: 1: "0"; }}} s: 13: "examquestions"; N; S: 9: "examscore"; S: 0: ""; S: 10: "examstatus"; S: 1: "0"; S: 8: "examtype"; S: 1: "1"; S: 12: "examauthorid"; S: 1: "2"; S: 10: "examauthor"; S: 9: "redrangon"; S: 8: "examtime"; S: 10: "1372249127"; S: 11: "examkeyword"; S: 0: ""; S: 10: "examdecide"; S: 1: "0"; }

Excuse me: how will the above data deserialization (analysis)?

CodePudding user response:

Use the

http://www.pblsoft.com/sailjson.htm

Can be deserialized

CodePudding user response:

Moderators, used and not parse it out ah, don't you try,,,,,,, thanks to the moderator, trouble,

CodePudding user response:

Lz you serialization is used to serialize PHP, not for the json data, this is not suitable for example of the moderator is json mode (moderator), if use the json_encode json serialization to PHP array with a moderator is a very good example,

CodePudding user response:

The original poster can refer to http://www.nowamagic.net/librarys/veda/detail/2153, this is a PHP serialized mode

CodePudding user response:

You predecessors, who has in view of the serialize PHP deserialization function, help, urgent need,,,,

CodePudding user response:

@ jiang396: see, how to deserialize still no ideas, don't want to write a generic function,,,,

CodePudding user response:

refer to 6th floor wysyz response:
@ jiang396: article saw, how deserialization still no ideas, don't want to write a generic function,,,,

Now the background design is a PHP for PHP docking system, because the serialize PHP has its own function, your backend server should develop into a json serialization, because this is the json universal, no matter what kind of development tools can, pb is certainly not good analytic own serialize PHP serialized data, ask the server side, you have a json interface

CodePudding user response:

@ jiang396: this is not a PHP software we developed,,,,,,, json serialization need to modify the development level, I just use PB secondary development,,, have a headache ing,,,

CodePudding user response:

Another way is to your own to create a PHP server, is very simple, may be a function of one or two other PHP statement, mainly is translated into the json data, then use pb for can,

CodePudding user response:

references 9 f jiang396 response:
there is another way is to your own to create a PHP server, is very simple, may be a function of one or two other PHP statement, mainly is translated into the json data, then use pb for can,

Useless, has not been PHP ah,,,, I also use PB development of amateur, not professional players

CodePudding user response:

references to the tenth floor wysyz response:
Quote: references 9 f jiang396 response:

Another way is to your own to create a PHP server, is very simple, may be a function of one or two other PHP statement, mainly is translated into the json data, then use pb for can,

Useless, has not been PHP ah,,,, I also use PB development of amateur, not professional players


You are in Beijing, I can help you, you are outside, can only take an examination of oneself self-study, PHP is very simple

CodePudding user response:

You this should be a json data, you can write an analytic function

CodePudding user response:

refer to 12 floor QHJQWJ reply:
this should be a json data, you can write a parsing function of


Predecessor, this is the serialization of the PHP function generated, not json serialization,

CodePudding user response:

Your question is PHP will [object] serialization, and json is serialized array, the second floor moderators to your link example is json, not for object, your the last give you preach a object (serialization), so cause you can't deserialization,

CodePudding user response:

PHP for object serialization, usually only PHP own unserialize () function to solve, other programming language is can't translation,
  • Related