Comments (4)
Considering that it's not an official standard and it will depend on at least one JSON library, a new repo (depending on this) will be created for this feature. Please wait for our follow-up actions.
from nbt.
Several details to be confirmed:
- I haven't found things about number arrays, what're their names?
byte_array
orbytearray
? - What will happen if
type
field does not exist? Guess the type fromvalue
field or just throw an error? - What will happen if an unmatched value is read (for example, got a number but required a string, or got a floating number but required an integer)? Convert to required type automatically or just throw an error?
from nbt.
Thanks for quick response :)
- I've never seen usage of number arrays in such a format, so I suppose it's up to you. For instance
minecraft-data
usesbyte_array
to describe the protocol, so it might be a fair candidate. - I think it should throw an error in both scenarios, because it is just cleaner and it requires less effort to implement it. In the future it could be extended by some kind of flexible matcher that may perform conversion, but I don't really see the case for this now
🤔
from nbt.
I've created a simple mapper from JSON to NBT, so it's not a problem for me. I reported it to just let you know that some people may also find it useful in the future.
Instead of a new repo, you could also consider modularization of this one like this:
nbt-parent/ - parent settings for both modules
nbt/ - core NBT module
nbt-json/ - JSON support for NBT module
In most cases it's the best solution for such a projects.
from nbt.
Related Issues (1)
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 nbt.