ItemStack to Gson works except for books and other items & Custom Key String Value

Try use DataView: Serializing Data — Sponge 7.2.0 documentation

But there is another problem, all enchantment will convert to protect I. I will post this issue later.

Edit:
Code is show at Enchantments couldn't retreat due ItemStack serialization
afaik, this can handle all except enchant item and shulker box.