isBlobSerialized
isBlobSerialized(
blob
):Promise
<boolean
>
Checks if the provided blob is serialized.
This function attempts to parse the input blob
as JSON. If parsing is successful,
it indicates that the blob is serialized. If the input is not a string or cannot be
parsed as JSON, it returns false.
Parameters
• blob: any
The input data to check for serialization. This can be of any type.
Returns
Promise
<boolean
>
A promise that resolves to a boolean value:
- true
if the blob is a valid JSON string and is serialized.
- false
if the blob is not a string or if it cannot be parsed as JSON.
Throws
If the input is not a string and cannot be parsed.