Skip to content

Commit f9423ae

Browse files
specifications
1 parent 1a6d2f1 commit f9423ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Java-SerialX
22
SerialX is a powerful utility library to serialize objects in Java. Serialization means storing Java objects and values into file. <br>
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.
4+
## Brief overview of working concept and advantages compared to regular serialization:
5+
**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 SerializationProtocols that are registred in ProtocolRegistry, each working for certain class! SerializationProtocol contains to methods, "serialize" and "unserialize". "serialize" 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" method as argument. Job of "unserialize" method is then to create an object 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!
7+
**Advantages:**
8+
* Overcomeing most of regular serialization problems such as bypassing constructor!
9+
* Powefull and highly costomizable, you have control over stuff!
10+
* Programmaticall, meaning you can decide how objects will be serialized and deserialized!
11+
* Fast, SerialX is almost always far more faster than regular serialization!
12+
* Readable, SerialX as format is pretty readable for humans and is also pretty intuitive as well so can be also written by humans!
13+
* Data types recognision, SerialX supports all primitve datatypes from java and also objects (done with protocols) compare to Json for instance!
14+
* Small storage requirements, as you can see belove SerialX is often times far smaller than Json not even mentioning XML!
15+
416
## Comparison: JACKSON (Json) vs XMLEncoder (XML) vs SerialX (SerialX data storage)
517
Sample object:
618
```

0 commit comments

Comments
 (0)