Download the PHP package lukasz93p/object-serializer without Composer
On this page you can find all versions of the php package lukasz93p/object-serializer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lukasz93p/object-serializer
More information about lukasz93p/object-serializer
Files in lukasz93p/object-serializer
Package object-serializer
Short Description Package which allows easy serialization and deserialization of php objects using JSON format, setters or public properties are not needed.
License MIT
Informations about the package object-serializer
object-serializer
Current implementation uses jms/serializer: https://packagist.org/packages/jms/serializer
So jms/serializer's annotations are a must for this package - here You can read about them: http://jmsyst.com/libs/serializer/master/reference/annotations
Why to use this package?
- It gives You very easy to use tool to convert php objects into JSON and inversely.
- Public properties, constructor or setters are not required so converted objects can utilize full encapsulation.
- Native php serialization is not used so serialized objects are not language dependent.
- Supports very rich spectrum of properties types (including class instances).
Hot to use?
1 Class which You want to serialize have to implement
2 Add annotations to class implementing SerializableObjects like it's described in jms/serializer documentation: http://jmsyst.com/libs/serializer/master/reference/annotations.
3 Serialize class instance:
4 Deserialize class instance:
5 Instantiation of : You should do this through method. That method receives associative array which is used as mapping between result of and fully qualified class name for each class implementing .
Example
All versions of object-serializer with dependencies
doctrine/annotations Version ^1.8
jms/serializer Version ^3.3
ext-json Version *