@json-serialization/binary
provide s a binary serialization and deserialization mechanism, supporting ArrayBuffer
, Buffer
, Blob
, File
, Uint8Array
these data types.
Note:
@json-serialization/binary
needs to be used in conjunction withjson-serialization
. This is an extensible asynchronous JSON serialization library. You can get to know it by reading this document.
-
Considering that
Buffer
is not supported in a web environment,Blob
andFile
may not be supported in lower versions of Node.js environment. During deserialization,@json-serialization/binary
may convert these three data types to and from each other to ensure adaptation to the running environment. -
In order to prevent
Buffer
from being preprocessed byJSON.stringify
,@json-serialization/binary
will internally set thetoJSON
attribute on theBuffer
object instance, with the value set tonull
. Please pay attention to and handle the possible Influence.