You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ This project is just an attempt to implement a feature to serialize objects (per
8
8
9
9
### How to get universal serialization feature in your classes
10
10
11
-
To get the full features, you just have to import in your system 4 classes (1) : _OPNLib.Serialize.Adaptor, OPNLib.Serialize.Utiland OPNLib.Serialize.TemplateOPNLib.Serialize.TemplateCSV_.
11
+
To get the full features, you just have to import in your system 4 classes (1) : `OPNLib.Serialize.Adaptor`, `OPNLib.Serialize.Util`, `OPNLib.Serialize.TemplateOPNLib.Serialize.Template`and `OPNLib.Serialize.TemplateOPNLib.Serialize.TemplateCSV` (this last one it's not yet finished in Release 1/2018-04).
12
12
13
-
(1) Actually you would just need _OPNLib.Serialize.Adaptor_ if you just need JSON serialization
13
+
(1) Actually you would just need `OPNLib.Serialize.Adaptor` if you just need JSON serialization
14
14
15
15
### Start Serializing
16
16
17
-
To enable this feature for a class, that class has to extend from _OPNLib.Serialize.Adaptor_. That'll be the only time that you'll have to touch your class for this feature. After that moment your class will be able to export/import JSON objects and it will accept future serialization mechanisms that you decide to implement without having to make more changes to class definition.
17
+
To enable this feature for a class, that class has to extend from `OPNLib.Serialize.Adaptor`. That'll be the only time that you'll have to touch your class for this feature. After that moment your class will be able to export/import JSON objects and it will accept future serialization mechanisms that you decide to implement without having to make more changes to class definition.
18
18
19
19
---
20
20
@@ -82,6 +82,20 @@ During map generation, by default, the `Adaptor` sets export and import conversi
82
82
83
83
---
84
84
85
+
This is an example of two nodes in global `^MAPS` and their counterpart in `^MAPSREV`:
### How could we configure our mapping for serialization?
86
100
87
101
We can have as much mapping definitions for a class as we need. An easy way to start to define our customized maps is exporting the default `MAP0` and importing it again with a different name, then we can make changes in the map regarding the properties that should be exported /imported, names, conversor methods to apply. To do this, we can modify directly in the global, or do it programatically (See `OPNLib.Serialize.Util` class for tools to export/import maps, get / set property mappings,etc…)
0 commit comments