GithubHelp home page GithubHelp logo

royalwang / phpserializeddatareader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stabijjack/phpserializeddatareader

0.0 2.0 0.0 111 KB

DeSelialize PHPSerialized file to java Objects

Java 100.00%

phpserializeddatareader's Introduction

PHPSerializedDataReader

DeSerialize PHPSerialized data to java Objects

Constructor accepts Strings formatted as

  1. Serialized Array definition on http://www.phpinternalsbook.com/php5/classes_objects/serialization.html
  2. Serialized structure example: {"name"= "value","name"={"name"="value,"name"="value"}}

Available methods

  • getoption.. methods correct object or throws error for existing options and for wrong object type
  • isOption... returns true or false
  • getOptionsNames.... return filled - or empty set
  • exportFieldMapToExcelCSVFile accepts String FileName

Serialized Array definition

starts with a:

array [10, 11, 12]:" serialized as "a:3:{i:0;i:10;i:1;i:11;i:2;i:12;}"**
is implemented with integer as string name field as below
**[0 => "aaa", 1 => false]: a:2:{s:1:"0";s:3:"aaa";s:1:"1";b:0}**

Not implemented:

  • Test Object with properties:
    O:4:"Test":3:{s:6:"public";i:1;s:12:"\0*\0protected";i:2;s:13:"\0Test\0private";i:3;}
  • Test2 Object with his own serialization method
    C:5:"Test2":6:{foobar}
  • internal reference
    a:2:{i:0;s:3:"foo";i:1;R:2;}
  • internal reference
    O:8:"stdClass":1:{s:3:"foo";r:1;}

Serialized structure

example: {"name"= "value","name"={"name"="value,"name"="value"}}

structure: {nameValuePair, .....}

nameValuePair is "name"= value

value is

  1. structure {...}
  2. String "..."
    \" between "" represents a "
  3. Null
  4. true
  5. false
  6. any sequence of characters until the next , or }

phpserializeddatareader's People

Contributors

stabijjack avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.