V8 Serialization Format Constants
Enums and constant values for the V8 serialization format.
constants.kLatestVersion
constants.kLatestVersion
The current supported serialization format implemented here.
constants.SerializationTag
constants.SerializationTag()1-byte tags used to identify the type of the next value.
Notes
These tags are defined in the SerializationTag enum in the v8 src.
Attributes
constants.ArrayBufferViewTag
constants.ArrayBufferViewTag()Attributes
| Name | Description |
|---|---|
| kBigInt64Array | |
| kBigUint64Array | |
| kDataView | |
| kFloat16Array | |
| kFloat32Array | |
| kFloat64Array | |
| kInt16Array | |
| kInt32Array | |
| kInt8Array | |
| kUint16Array | |
| kUint32Array | |
| kUint8Array | |
| kUint8ClampedArray |
constants.ArrayBufferViewFlags
constants.ArrayBufferViewFlags()Attributes
| Name | Description |
|---|---|
| IsBufferResizable | |
| IsLengthTracking |
constants.SerializationErrorTag
constants.SerializationErrorTag()Attributes
| Name | Description |
|---|---|
| Cause | Followed by a JS object: cause. |
| End | The end of this error information. |
| EvalErrorPrototype | The error is a EvalError. No accompanying data. |
| Message | Followed by message: string. |
| RangeErrorPrototype | The error is a RangeError. No accompanying data. |
| ReferenceErrorPrototype | The error is a ReferenceError. No accompanying data. |
| Stack | Followed by stack: string. |
| SyntaxErrorPrototype | The error is a SyntaxError. No accompanying data. |
| TypeErrorPrototype | The error is a TypeError. No accompanying data. |
| UriErrorPrototype | The error is a URIError. No accompanying data. |
constants.TagConstraint
constants.TagConstraint(name: str, allowed_tags: TagSet[TagT_co])A named set of SerializationTags.
Attributes
| Name | Description |
|---|---|
| allowed_tag_names | A human-readable list of SerializationTags allowed by this constraint. |
| allowed_tags | The set of tags allowed by this constraint. |
| name | A description of the tags allowed by this constraint. |
constants.JS_OBJECT_KEY_TAGS
constants.JS_OBJECT_KEY_TAGS
Tags that are allowed in the context of a JSObject key.
Numbers (except bigint) and strings.
constants.ConstantTags
constants.ConstantTags
constants.JS_CONSTANT_TAGS
constants.JS_CONSTANT_TAGS
Tags for JavaScript constant values.
When deserializing, the default Python values representing the JavaScript constants are:
| SerializationTag | JavaScript | Python |
|---|---|---|
| kTheHole | (empty array index) | JSHole |
| kUndefined | undefined |
JSUndefined |
| kNull | null |
None |
| kTrue | true |
True |
| kFalse | false |
False |
constants.JS_ARRAY_BUFFER_TAGS
constants.JS_ARRAY_BUFFER_TAGS
constants.JS_PRIMITIVE_OBJECT_TAGS
constants.JS_PRIMITIVE_OBJECT_TAGS
SerializationTag values that represent wrapped primitive values.
These are primitive values wrapped in an object on the heap.
constants.PrimitiveObjectTag
constants.PrimitiveObjectTag
The type of the SerializationTag values in JS_PRIMITIVE_OBJECT_TAGS
constants.JS_STRING_TAGS
constants.JS_STRING_TAGS