@@ -10,9 +10,9 @@ Data Serialization
1010What is data serialization?
1111***************************
1212
13- Data serialization is the concept of converting structured data into a format
13+ Data serialization is the process of converting structured data into a format
1414that allows it to be shared or stored in such a way that its original
15- structure can be recovered or reconstructed. In some cases, the secondary intention of data
15+ structure should be recovered or reconstructed. In some cases, the secondary intention of data
1616serialization is to minimize the size of the serialized data which then
1717minimizes disk space or bandwidth requirements.
1818
@@ -21,7 +21,7 @@ Flat vs. Nested data
2121********************
2222
2323Before beginning to serialize data, it is important to identify or decide how the
24- data should to be structured during data serialization - flat or nested.
24+ data should be structured during data serialization - flat or nested.
2525The differences in the two styles are shown in the below examples.
2626
2727Flat style:
@@ -65,7 +65,7 @@ The repr method in Python takes a single object parameter and returns a printabl
6565 a = { " Type" : " A" , " field1" : " value1" , " field2" : " value2" , " field3" : " value3" }
6666
6767 # the same input can also be read from a file
68- a =
68+ a = open ( ' /tmp/file.py ' , ' r ' )
6969
7070 # returns a printable representation of the input;
7171 # the output can be written to a file as well
@@ -135,7 +135,7 @@ structures in Python. One such example is below.
135135 print (ymlexcp)
136136
137137 Documentation on the third party module can be found
138- `here <https://pyyaml.org/wiki/PyYAMLDocumentation >`__.
138+ `in the PyYAML Documentation <https://pyyaml.org/wiki/PyYAMLDocumentation >`__.
139139
140140=======================
141141JSON file (nested data)
@@ -157,7 +157,7 @@ Writing:
157157
158158.. code-block :: python
159159
160- # writing JSON content to a file using the dump method
160+ # Writing JSON content to a file using the dump method
161161 import json
162162 with open (' /tmp/file.json' , ' w' ) as f:
163163 json.dump(data, f, sort_keys = True )
0 commit comments