[{"data":1,"prerenderedAt":124},["ShallowReactive",2],{"class-doc-/reference/2.0/gg_inventory/gginventoryserializationstrategy":3,"navigation":52},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"_id":8,"navigation":6,"addon":5,"version":9,"brief_description":10,"description":11,"tutorials":7,"methods":12,"signals":43,"constants":44,"members":45,"inherits":46,"name":47,"title":47,"_source":48,"_file":49,"_stem":50,"_extension":51},"/reference/2.0/gg_inventory/gginventoryserializationstrategy","gg_inventory",false,"","content:40.reference:2.0:gg_inventory:GGInventorySerializationStrategy.xml","2.0","Implements serialization/deserialization of inventory items for saving and sending them over the network.","Serialization turns [GGInventory] configuration and contents into a [Dictionary]. Deserialization is used to restore [GGInventory] configuration and contents from a [Dictionary].[br][br]The [method serialize] and [method deserialize] methods are invoked from a [GGInventory] instance according to its [member GGInventory.serialization_strategy].[br][br]The [method serialize_item] and [method deserialize_item] methods handle serialization/deserialization for each item in the inventory.[br][b]Note[/b]: This strategy only deserializes [GGItemData] instances. If you're using custom classes that extend [GGItemData], you should use the [GGInventorySerializationStrategyDynamic] instead.",[13,22,30,38],{"description":14,"name":15,"public":16,"returnType":17,"params":18},"Returns a [Dictionary] that contains the [param inventory] state.","serialize",true,"Dictionary",[19],{"name":20,"type":21},"inventory","GGInventory",{"description":23,"name":24,"public":16,"returnType":25,"params":26},"Restores the [param inventory] configuration and contents based on the provided [param state].","deserialize","void",[27,28],{"name":20,"type":21},{"name":29,"type":17},"state",{"description":31,"name":32,"public":16,"returnType":33,"params":34},"Returns the [param item] state as [Dictionary] or [code]null[/code].","serialize_item","Variant",[35],{"name":36,"type":37},"item","GGItemData",{"description":39,"name":40,"public":16,"returnType":33,"params":41},"Returns a [GGItemData] instance (or [code]null[/code]) based on the provided [param state].","deserialize_item",[42],{"name":29,"type":33},[],[],[],"Resource","GGInventorySerializationStrategy","content","40.reference/2.0/gg_inventory/GGInventorySerializationStrategy.xml","40.reference/2.0/gg_inventory/GGInventorySerializationStrategy","xml",[53,62,89,109],{"title":54,"_path":55,"children":56},"Getting Started","/getting-started",[57,59],{"title":58,"_path":55},"Introduction",{"title":60,"_path":61},"Installation","/getting-started/installation",{"title":63,"_path":64,"children":65},"Concepts","/concepts",[66,68,71,74,77,80,83,86],{"title":67,"_path":64},"Overview",{"title":69,"_path":70},"Inventory","/concepts/inventory",{"title":72,"_path":73},"Interactions","/concepts/interaction",{"title":75,"_path":76},"Permissions","/concepts/permissions",{"title":78,"_path":79},"Multiplayer","/concepts/multiplayer",{"title":81,"_path":82},"User Interface","/concepts/user-interface",{"title":84,"_path":85},"Game Integration","/concepts/game-integration",{"title":87,"_path":88},"Crafting","/concepts/crafting",{"title":90,"_path":91,"children":92},"Demos","/demos",[93,95,98,101,103,106],{"title":94,"_path":91},"Inventory Tour",{"title":96,"_path":97},"Inventory UI Playground","/demos/inventory_ui",{"title":99,"_path":100},"Inventory Game UI","/demos/inventory_game_ui",{"title":87,"_path":102},"/demos/crafting",{"title":104,"_path":105},"Multiplayer Lobby","/demos/mp_lobby",{"title":107,"_path":108},"Sequencer (prototype)","/demos/sequencer",{"title":110,"_path":111,"children":112},"Guide","/guide",[113,115,118,121],{"title":114,"_path":111},"Architecture Deep Dive",{"title":116,"_path":117},"Design Principles","/guide/design-principles",{"title":119,"_path":120},"Changelog v2.x","/guide/changelog-v2",{"title":122,"_path":123},"Changelog v1.x","/guide/changelog",1743268976861]