Skip to content

Commit bbcf0ad

Browse files
authored
Update README.md
1 parent 4d59f34 commit bbcf0ad

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ _(Example assumes that your classname is `SampleApps.Serialize.MapTesting`, that
2424
From the terminal,in the name space where your class exists :
2525

2626
```javascript
27-
2827
Set obj = ##class(SampleApps.Serialize.MapTesting).%OpenId(1)
2928
Set objJSON = obj.Export()
3029
Do objJSON.%ToJSON()
@@ -46,9 +45,9 @@ Basically when we compile a class that inherits from our Adaptor, the class will
4645

4746
We can have several maps for a particular class (for example to exchange data from an object with different systems or organizations, we might need to export or import some properties but not others, or apply different conversions to some values, or name the properties differently , etc…).
4847

49-
By default, all classes that inherit from `OPNLib.Serialize.Adaptor` will have an associated default map: MAP0, that will make a direct mapping regarding property names (same name for target an source property).
48+
By default, all classes that inherit from `OPNLib.Serialize.Adaptor` will have an associated default map: `MAP0`, that will make a direct mapping regarding property names (same name for target an source property).
5049

51-
Each property will be categorized in group types, numbered from 1 to 6. Currently these are the group types supported :
50+
Each property will be categorized in group types, numbered from `1` to `6`. Currently these are the group types supported :
5251

5352
Code | Category | Description
5453
---- | ------------- | -----------
@@ -60,10 +59,10 @@ Code | Category | Description
6059
6 | List of Objects | A property of type %Collection.ListOfObject
6160
7 | Stream | Properties of type %Stream.*, %CSP.*stream*,…
6261

63-
During map generation, by default, the Adaptor sets export and Import conversion methods for dates and streams (which are exported as a stream in base64).
62+
During map generation, by default, the `Adaptor` sets export and import conversion methods for dates, datetimes, timestamps and streams (which are exported as a stream in base64).
6463

6564
---
66-
** MAPS / MAPSREV globals' structure**
65+
**MAPS / MAPSREV globals' structure**
6766

6867
^MAP("*classname*","*mapname*",_GroupType[1..6]_,"_Source Property Name_") = *List Element*
6968

@@ -85,7 +84,7 @@ During map generation, by default, the Adaptor sets export and Import conversion
8584

8685
### How could we configure our mapping for serialization?
8786

88-
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…)
87+
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…)
8988

9089
---
9190
**Example:**
@@ -148,11 +147,11 @@ Anyway, the primary class is not affected and doesn't have to be changed no matt
148147
Using these classes is very easy. Let's see an example:
149148

150149
---
151-
Example :
150+
**Example:**
152151

153-
We want to be able to export SampleApps.Serialize.PersistObject to JSON, but just some of the properties: `cod`, `description` and `start`. We want to project those properties, for example, in Spanish, as: `codigo`, `descripcion` and `inicio` respectively.
152+
We want to be able to export `SampleApps.Serialize.PersistObject` to JSON, but just some of the properties: `cod`, `description` and `start`. We want to project those properties, for example, in Spanish, as: `codigo`, `descripcion` and `inicio` respectively.
154153

155-
We design the required map, that we call MAP2 and load it:
154+
We design the required map, that we call `MAP2` and load it:
156155

157156
```javascript
158157
do ##class(SampleApps.Serialize.HandleMaps).SetPersistObjectMAP2()

0 commit comments

Comments
 (0)