Properly handle JSON encoding for Bytes
and Date
in primitives
#915
Labels
bug 🐞
Something isn't working
Bytes
and Date
in primitives
#915
What happened:
The current implementation of the
toJSON
method does not account for the JSON encoding ofBytes
andDate
types in theprimitives
. This omission can lead to incorrect serialization of these data types when they are expected to be properly formatted in JSON.yorkie-js-sdk/packages/sdk/src/document/crdt/primitive.ts
Lines 101 to 112 in 5d4ded9
What you expected to happen:
The
toJSON
method should return a well-formed JSON representation forBytes
andDate
, ensuring proper serialization of these types when used.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: