Minestom / Hephaistos

NBT & Anvil save format library
MIT License
57 stars 10 forks source link

Add read methods for use with access to a JsonElement #20

Closed outroddet closed 2 years ago

outroddet commented 2 years ago

For deserializing directly from a JsonElement to NBT

outroddet commented 2 years ago

Hey, thx for your answer. I changed the pr.

jglrxavpok commented 2 years ago

Would be perfect if you could add a few tests inside common/src/test (mainly to ensure it still compiles if there are changes). Also, is there a reason why your parseWithGuess method is no longer here?

outroddet commented 2 years ago

When I add test to "common" there is a circular dependency between common and gson. What parseWithGuess method do you mean? There wasn't something like that.

jglrxavpok commented 2 years ago

My bad, the tests should be inside gson/test. As for parseWithGuess, I guess I misremembered something, forget it.

outroddet commented 2 years ago

I added some tests. Hopefully it's fine now.