{ } qjs-modules

bjson

Source: quickjs-bjson.c — module exports a flat list of functions.

Reads and writes values using QuickJS's native binary object serialization (the same format used by JS_ReadObject / JS_WriteObject).

Functions

FunctionArgsDescription
read(buffer, offset, length, flags)4Deserializes a JS value from the bytes of an ArrayBuffer at offset/length, using the JS_READ_OBJ_* flags.
write(value, flags)2Serializes value to an ArrayBuffer, using the JS_WRITE_OBJ_* flags.

Constants

Read flags: JS_READ_OBJ_BYTECODE, JS_READ_OBJ_ROM_DATA, JS_READ_OBJ_SAB, JS_READ_OBJ_REFERENCE.

Write flags: JS_WRITE_OBJ_BYTECODE, JS_WRITE_OBJ_BSWAP, JS_WRITE_OBJ_SAB, JS_WRITE_OBJ_REFERENCE.

Export list

Generated by utilities/doc-api.js from the bjson dump of utilities/api-surface.sh: 10 members. Edit the text above this block, not the block.

Functions: read(), write()

Values: JS_READ_OBJ_BYTECODE = 1, JS_READ_OBJ_REFERENCE = 8, JS_READ_OBJ_ROM_DATA = 2, JS_READ_OBJ_SAB = 4, JS_WRITE_OBJ_BSWAP = 2, JS_WRITE_OBJ_BYTECODE = 1, JS_WRITE_OBJ_REFERENCE = 8, JS_WRITE_OBJ_SAB = 4