CloudburstMC / Protocol

A protocol library for Minecraft Bedrock Edition
https://git.io/ProtocolLib
Apache License 2.0
310 stars 96 forks source link

Move away from jose jwt to jose4j #205

Closed Tim203 closed 1 year ago

Tim203 commented 1 year ago

I originally updated the jose jwt library version in #199, but was decided against since it'd bundle Gson which is a relatively large json library. The idea came up to move to an other JWT library which still uses json simple (orgjson) and ultimately ended up with jose4j. I also included some other changes to EncryptionUtils to make it more useful for projects using Protocol.

hax0r31337 commented 1 year ago

Gson is a wide-used json library and many projects which using this library also uses Gson as a json library, In my opinion its better to upgrade the library than replace with another one.

SupremeMortal commented 1 year ago

Gson is a wide-used json library and many projects which using this library also uses Gson as a json library, In my opinion its better to upgrade the library than replace with another one.

Using Gson would still be replacing one library with another. We're trying to keep this project as slim as possible with no unnecessarily large dependencies like Gson. Also, not every downstream project uses Gson as their default JSON serialisation library, so including another full-fat library is wasteful, especially when this protocol library doesn't need any fancy serialisation features.