Skip to content

Added support for BSON#2

Open
RoBoT095 wants to merge 5 commits into
Fasoo-DigitalPage:mainfrom
RoBoT095:main
Open

Added support for BSON#2
RoBoT095 wants to merge 5 commits into
Fasoo-DigitalPage:mainfrom
RoBoT095:main

Conversation

@RoBoT095
Copy link
Copy Markdown
Contributor

@RoBoT095 RoBoT095 commented Sep 6, 2025

In response to #1, this isn't a full integration of it and mostly a wrapper for SketchDataConverter.toJson() so you don't exactly get all the speed benefits, as you are still dealing with json. This is purely for supporting the BSON format.

It probably needs more testing as I haven't tried the model > content > shape/draw overrides, ex:

@override
BsonBinary toBson() => BsonCodec.serialize(toJson());

But the SketchDataConverter and SketchController seem to work just fine.

I still recommend for you to go through it and clean it up as you like, I am honestly not very familiar with all the workings of BSON, but I did my best.

Screenshot_1757128116

@RoBoT095
Copy link
Copy Markdown
Contributor Author

RoBoT095 commented Sep 6, 2025

Trying to use my fork in my own project, it would probably be better to change the serialization and deserialization from BsonBinary to List so it would be easier to do File(filepath).readAsBytes() and users wouldn't need to use the bson library themselves.

I'll see about changing this later myself.

@RoBoT095
Copy link
Copy Markdown
Contributor Author

RoBoT095 commented Oct 9, 2025

My bad, I did the mistake of merging scroll controller into this branch, my fault for making this pull request be my main, instead of a separate branch. I know it won't be an issue, but I prefer to keep things clean.

Also, I just suck at git and github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant