Comments (6)
https://github.com/cuyz/valinor seems like a decent replacement
from pocketmine-mp.
https://github.com/cuyz/valinor seems like a decent replacement
After exploring the possibilities provided by this library :
- The rewriting of JsonMapper -> Valinor works very well, the structure is practically the same with similar functions.
- It is not possible to tag properties as optional unless you create a constructor with optional parameters for each class mapping (annoying).
- Customisation and configuration seem simpler, allowing more things to be done
- It isnt possible to deal with objet, only array or file is allowed.
The only current limitation I can see is the inability to tag properties as optional.
from pocketmine-mp.
It is not possible to tag properties as optional unless you create a constructor with optional parameters for each class mapping (annoying).
My understanding was that properties with default values are considered optional, am I wrong? AFAIK it should work pretty much seamlessly with the existing models (caveat: I have not tested)
from pocketmine-mp.
What i've tested is to create a constructor with all value at null by default. If its different than null, setting the properties.
I havent tested with direct default value in the properties.
The annoying side of this stay in the need to write all this constructor or default value in properties (which can cause unexpected bug if its set directly)
from pocketmine-mp.
I think the current JSON models already set default values for all optional stuff anyway, so it shouldn't be an issue.
I wouldn't worry about the constructor stuff. We don't manually construct the model objects anyway.
from pocketmine-mp.
I think the current JSON models already set default values for all optional stuff anyway, so it shouldn't be an issue.
Is it null ?
from pocketmine-mp.
Related Issues (20)
- give more functionality to pocketmine HOT 7
- A system to let transactions decide what stuff can go into a particular inventory slot
- Fixed variables in e.g. VanillaBlocks.php HOT 3
- Server crashed HOT 1
- Packet Processing Error Bug. HOT 1
- Performance issue in BlockStateUpgrader HOT 2
- Opening shulker box doesn't push entities
- Block changes don't move entities to where they should be
- Weakness effect makes instant damage splash potions weaker
- Version HOT 4
- Tile network NBT serialization needs a TypeConverter context
- I got a "Segmentation fault" error in bin\php\php.exe. start.cmd HOT 1
- Unexpected trailing data after 3D biomes data HOT 14
- Same file inline optimization
- Enums limit plugins' ability to create custom stuff with existing PM core code
- Variable chunk send rate based on available bandwidth
- Explore running RakLib without a thread
- I'm retiring HOT 104
- Changer RakLib write in full php to extension zend with Raknet official HOT 5
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 pocketmine-mp.