Skip to content

Commit fd867b9

Browse files
Update README.md
1 parent e739fab commit fd867b9

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

README.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Compare to this, **SerialX API** is doing everything programmatically. SerialX A
1515
* Quantity, SerialX can nserialize multiple objects in to 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

18-
## Comparison: JACKSON (Json) vs XMLEncoder (XML) vs SerialX (SerialX data storage)
18+
## Comparison: XML (.xml) vs Json (.json) vs YAML (.yml) vs SerialX (.srlx)
1919
Sample object:
2020
```
2121
public class Foo
@@ -59,17 +59,7 @@ public class Foo
5959
}
6060
```
6161
##
62-
Serialized via **Json:**
63-
```
64-
...
65-
{
66-
"val1" : 55,
67-
"val2" : 455.45,
68-
"val3" : 236.12,
69-
"flag" : true
70-
}
71-
```
72-
Serialized via **XML:**
62+
Serialized via **XMLDecoder for XML:**
7363
```
7464
<?xml version="1.0" encoding="UTF-8"?>
7565
<java version="1.8.0_92" class="java.beans.XMLDecoder">
@@ -89,10 +79,47 @@ Serialized via **XML:**
8979
</object>
9080
</java>
9181
```
92-
Serialized via **SerialX:**
82+
Serialized via **JACKSONE (hypothetical) for Json:**
83+
```
84+
...
85+
{
86+
"val1" : 55,
87+
"val2" : 455.45,
88+
"val3" : 236.12,
89+
"flag" : true
90+
}
91+
```
92+
Serialized via **(hypothetical) YAML:**
93+
```
94+
val1: 55,
95+
val2: 455.45,
96+
val3: 236.12,
97+
flag: true
98+
```
99+
Serialized via **SerialX for SerialX (protocol):**
93100
```
94101
some.package.Foo 55D 455.45 236.12F T;
95102
```
103+
<br>
104+
After introduction od variables in 1.5.0 and cope in 1.2.0: <br>
105+
Serialized via **SerialX for SerialX (protocol + scope):**
106+
```
107+
some.package.Foo {
108+
val1 = 55D,
109+
val2 = 455.45,
110+
val3 = 236.12F,
111+
flag = T
112+
}
113+
```
114+
Serialized via **SerialX for SerialX (scope only):**
115+
```
116+
{
117+
val1 = 55D,
118+
val2 = 455.45,
119+
val3 = 236.12F,
120+
flag = T
121+
}
122+
```
96123
Maybe it is a question of formating but SerialX will be the shortest one anyway. Because instead of having some sort of key to the value you simply have its order (index)!
97124
And value's data type is specified by suffix if it is a primitive data type or simply by package name as the first argument in case of an object! Other arguments (count, order, type) are then specified by a SerializationProtocol! Generally, one line means one object, one value (separated by spaces) means one argument! <br><br>
98125
Note: Since there is variable system in 1.5.0, the order of values is now not the only option to obtain an object or value! <br>

0 commit comments

Comments
 (0)