Skip to content

Commit d9d2ac3

Browse files
Update README.md
1 parent 7ea7fda commit d9d2ac3

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
@@ -4,10 +4,10 @@ SerialX is improving regular Java Base64 serialization and adding serialization
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>
66
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 reconstruct this exact object from, such as constructor arguments! These arguments are then paste into ``Serializer`` and ``Serializer`` serialize them into mentioned SerialX API data storage format. 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>
7-
Note: Since 1.3.0, protocols are operated by DataParsers and are mainly used for more complex objects. Also Object -> String conversion is now done by DataConverter and String - Object is done by DataParsers and further by protocols!
7+
Note: Since 1.3.0, protocols are operated by DataParsers and are mainly used for more complex objects. Also Object to String conversion is now done by DataConverter and String - Object is done by DataParsers and further by protocols!
88
**Advantages and goals:**
99
* Overcoming most of regular serialization problems such as bypassing constructor!
10-
* Powerful and highly costomizable, you have control over stuff via protocols and recursive descent parser!
10+
* Powerful and highly costomizable/opinionated, you have control over stuff via protocols and recursive descent parser!
1111
* Programmaticall, meaning you can decide how objects will be serialized and deserialized!
1212
* Fast, SerialX solution is almost always far more faster than regular serialization!
1313
* Readable, It depends but SerialX formats are supposed to be pretty readable for humans and should be also pretty intuitive for learning and writing!

0 commit comments

Comments
 (0)