Skip to content

Commit a5d9d3c

Browse files
Update README.md
1 parent c7fdb83 commit a5d9d3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SerialX is a powerful utility library to serialize objects in Java. Serializatio
33
SerialX is improving regular Java Base64 serialization and adding serialization protocols that you can create for objects that cant be serialized using regular way. For example final non-serializable objects, 3rd party objects and others. SerialX is also JSON like "programming" language (data storage) that are objects serialized into. So this allows you to serialize multiple objects into one string or also into file. But unlike to JSON, SerialX is based on determinate order of arguments and values we can say. In other words SerialX allows you to serialize **anything**, it's pretty simple to use and practically limitless, however you need to know that "order" is your friend, not an enemy.
44
## Brief overview of working concept and advantages compared to regular serialization:
55
**Regular java serialization** is strongly based on some kind of "magic" or we can say "godly reflection" which will reflectivly read all fields of object includeing private and final ones and then interprets it as Base64 string. And during deserialization it will create an empty instance of object absolutly ignoring its constructors by using some "magic" compilator process to create it instad, and then it will violently write all serialized field again includeing private and final ones which is realy not the best aproach! Also this alows you to serialize only instances of java.io.Serializable and all field must be instances of Serializable as well which is also not the most usefull thing! <br>
6-
Compare to this, **SerialX API** is doing everything programmatically. SerialX API uses ``SerializationProtocol``s that are registred in ``ProtocolRegistry``, each working for certain class! ``SerializationProtocol`` contains to methods, ``serialize(T object)`` and ``unserialize(Object[] args)``. ``serialize(T object)`` method obtains certain object to serialize and its job is to turn this object in to array of objects that we can then create this exact object from, such as constructor arguments! These arguments are then paste into ``Serializer`` and ``Serializer`` serialize them into mentioned SerialX format data storage. During deserialization, ``Serializer`` first takes givven data serialized in SerialX unserialize them into array of objects and this array is then paste into ``unserialize(Object[] args)`` method as argument. Job of ``unserialize(Object[] args)`` method is to create an new instance of serialized object ``T`` from givven arguments! Evrything in this function is controlled by you and you can write them by your self which gives you an absolute control! <br>
6+
Compare to this, **SerialX API** is doing everything programmatically. SerialX API uses ``SerializationProtocol``s that are registred in ``ProtocolRegistry``, each working for certain class! ``SerializationProtocol`` contains 2 methods, ``serialize(T object)`` and ``unserialize(Object[] args)``. ``serialize(T object)`` method obtains certain object to serialize and its job is to turn this object into array of objects that we can then create this exact object from, such as constructor arguments! These arguments are then paste into ``Serializer`` and ``Serializer`` serialize them into mentioned SerialX format data storage. During deserialization, ``Serializer`` first takes givven data serialized in SerialX unserialize them into array of objects and this array is then paste into ``unserialize(Object[] args)`` method of certain ``SerializationProtocol`` as argument. Job of ``unserialize(Object[] args)`` method is to create an new instance of serialized object ``T`` from givven arguments! Evrything in this function is controlled by you and you can write them by your self which gives you an absolute control! <br>
77
**Advantages:**
88
* Overcoming most of regular serialization problems such as bypassing constructor!
99
* Powefull and highly costomizable, you have control over stuff!
@@ -12,7 +12,7 @@ Compare to this, **SerialX API** is doing everything programmatically. SerialX A
1212
* Readable, SerialX as format is pretty readable for humans and is also pretty intuitive as well so can be also written by humans!
1313
* Data types recognision, SerialX supports all primitve datatypes from java and also objects (done with protocols) compare to Json for instance!
1414
* Small storage requirements, as you can see belove SerialX is often times far smaller than Json not even mentioning XML!
15-
* Quantity, SerialX can nserialize multiple objects in to one file or string!
15+
* Quantity, SerialX can serialize multiple objects into one file or string!
1616
* Very easy to use, at the begining all what you need to know is ``Serializer.SerializeTo(file, objects)`` for serializing and ``Serializer.LoadFrom(f)`` for deserializing!
1717

1818
## Comparison: XML (.xml) vs Json (.json) vs YAML (.yml) vs SerialX (.srlx)

0 commit comments

Comments
 (0)