Skip to content

presentkim-pm/item-serialize-utils

Repository files navigation

Poggit CI Stars License


Logo

item-serialize-utils

Provides utils for (de)serialize more shorter and easier!

View in Poggit · Report a bug · Request a feature

About The Project

✔️ Provides classes for serialize item

  • kim\present\utils\itemserialize\ItemSerializeUtils
  • kim\present\utils\itemserialize\SerializeMode

✔️ Provides util function for serialize item

  • ItemSerializeUtils::serialize(Item $item, SerializeMode $mode = SerializeMode::BINARY) : string

✔️ Provides util function for deserialize item

  • ItemSerializeUtils::deserialize(string $contents, SerializeMode $mode = SerializeMode::BINARY) : Item

✔️ Provides multiple serialize modes

  • SerializeMode::BINARY : Binary string that write by BigEndianNbtSerializer
  • SerializeMode::BASE64 : Same as BINARY, but encoded in base64_encode()
  • SerializeMode::HEX : Same as BINARY, but encoded in bin2hex()
  • SerializeMode::SNBT : Stringified Named Binary Tag format string
  • SerializeMode::JSON : JSON format string

NOTE : JSON mode is not same as Item::legacyJsonDeserialize()


Installation

See Official Poggit Virion Documentation


How to use?

See Main Document


License

Distributed under the MIT. See LICENSE for more information

About

Provides utils for (de)serialize more shorter and easier!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages