Initial Checks
Description
to_json() returns a str for models inherited from BaseDoc, whereas it is bytes for DocList
Example Code
from docarray import BaseDoc, DocList
class MyModel(BaseDoc):
text: str
print(type(MyModel(text="abc").to_json())) # <class 'str'>
print(type(DocList[MyModel]([MyModel(text="abc")]).to_json())) # <class 'bytes'>
Docarray Version
Affected Components
Initial Checks
Description
to_json()returns astrfor models inherited fromBaseDoc, whereas it isbytesforDocListExample Code
Docarray Version
Affected Components