File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ library.
69
69
heapq.rst
70
70
io.rst
71
71
json.rst
72
+ marshal.rst
72
73
math.rst
73
74
os.rst
74
75
platform.rst
Original file line number Diff line number Diff line change
1
+ :mod: `marshal ` -- Python object serialization
2
+ =============================================
3
+
4
+ .. module :: marshal
5
+ :synopsis: Convert Python objects to and from a binary format
6
+
7
+ |see_cpython_module | :mod: `python:marshal `.
8
+
9
+ This module implements conversion between Python objects and a binary format.
10
+ The format is specific to MicroPython but does not depend on the machine
11
+ architecture, so the data can be transferred and used on a different MicroPython
12
+ instance, as long as the version of the binary data matches (it's currently
13
+ versioned as the mpy file version, see :ref: `mpy_files `).
14
+
15
+ Functions
16
+ ---------
17
+
18
+ .. function :: dumps(value, /)
19
+
20
+ Convert the given *value * to binary format and return a corresponding ``bytes ``
21
+ object.
22
+
23
+ Currently, code objects are the only supported values that can be converted.
24
+
25
+ .. function :: loads(data, /)
26
+
27
+ Convert the given bytes-like *data * to its corresponding Python object, and
28
+ return it.
You can’t perform that action at this time.
0 commit comments