Comments (6)
Actually, the solution is simple: Qt's JSON code supports text-based and binary JSON files. You can check it out in the Qt example.
QJsonDocument saveDoc(gameObject);
saveFile.write(saveFormat == Json
? saveDoc.toJson()
: saveDoc.toBinaryData());
I want to get rid of my hand-made binary serialization and go for JSON in whatever form the user wants.
from nodeeditor.
Best solution would be to support both and let the user decide.
from nodeeditor.
Maybe you could abstract the serialization away so that the user can specify a custom serialization, with QJson as default serializer. This way everybody could plugin the serialization format they want.
If you need any help with this, let me know.
from nodeeditor.
Writing the abstracted serialization code is way not trivial. The serialization itself is a complex problem, thus, it is hard to foresee what a client's serialization implementation could look like. For not just the Json serialization is implemented (in its simplest form, without versioning).
from nodeeditor.
Is this completed? It seems that is is...
from nodeeditor.
Well, I made some sort of serializaiton to JSON, there is a way to construct JSON on-the-fly from your data structure and pass to deserialization.
But this is not an "abstracted serialization" -- it would be complicated and I did not go this way
from nodeeditor.
Related Issues (20)
- Bug: node rendering breaks when zooming in. HOT 2
- The object name "NodeDelegateModel" is misleading.
- Widget with label: size issue after text update HOT 3
- Help with read access violation when moving model to a widget HOT 1
- :-1: error: ninja: build stopped: subcommand failed. HOT 1
- crashed when click twice on a no-connection-port of locked-node
- Qt dependency problem
- an extra "t" in JSON key "intNodeId" but named inNodeId in ConnectionId HOT 2
- Dynamic ports in v3
- how to save file which refer to flow id
- Drag and drop flow file HOT 1
- Missing or incorrect inputs text
- Embedded widget with wrong size when content has changed HOT 3
- NODE_EDITOR_SHARED added to target public definition HOT 2
- Item is Clipped Sometimes. HOT 2
- display a widget but location is wrong HOT 1
- The context menu of QLineEdit can not be closed
- how to change the Graphics style dynamically ?
- connect exception
- Get Warning "qt.core.qobject.connect: QObject::connect: signal not found in NodeDelegateModel" while using load *.dll method. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodeeditor.