Appropriate way of saving player's inventory in database

Hello, I'm looking for an efficient way as well as other people perspective about saving player's inventories.

I'm working on creating an RPG SMP server, and I'm working on my OWN plugins for the RPG, and lately i found out a concerning problem about players inventories, I know there some ways of saving them i have tried using the base64 format of saving but found out that armor was not saving appropriate, And right now I'm Using JSON for saving player inventory in the database and save the inventory, armor and offhand in separate columns and after some headache about the metadata not working correctly I finally made it work.

Now my concern is that is JSON the most optimal ? My main idea was using JSON so it's gonna be easier for me to Fetch people items and UPDATE/BUFF/NERF them much easier than having the Inventory class encoded in base64 and saving it in the database it like that.

Could someone who worked on stuff like that give me a path or a tip about it ? Mainly if i should keep json and how could i make Updating/nerfing/buffing items more easily for all the player's
Was this page helpful?