Protocol
This class defines a set of supported serialization formats as string-based enumeration members. It allows for the selection between JSON and Pickle protocols for data exchange or storage.
Attributes
| Attribute | Type | Description |
|---|---|---|
| json | string = json | Specifies the JSON serialization format for data exchange. |
| pickle | string = pickle | Specifies the Python pickle serialization format for preserving complex object hierarchies. |
Methods
json()
def json() - > string
Represents the JSON serialization protocol for data exchange.
Returns
| Type | Description |
|---|---|
string | The string literal 'json' |
pickle()
def pickle() - > string
Represents the Python pickle serialization protocol for binary object persistence.
Returns
| Type | Description |
|---|---|
string | The string literal 'pickle' |