Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/presentkim-pm/item-serialize-utils
Provides utils for (de)serialize more shorter and easier!
https://github.com/presentkim-pm/item-serialize-utils
Last synced: about 2 months ago
JSON representation
Provides utils for (de)serialize more shorter and easier!
- Host: GitHub
- URL: https://github.com/presentkim-pm/item-serialize-utils
- Owner: presentkim-pm
- License: mit
- Created: 2024-02-20T07:55:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-27T15:10:14.000Z (2 months ago)
- Last Synced: 2024-10-27T17:25:53.857Z (2 months ago)
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Poggit CI][poggit-ci-badge]][poggit-ci-url]
[![Stars][stars-badge]][stars-url]
[![License][license-badge]][license-url]
item-serialize-utils
Provides utils for (de)serialize more shorter and easier![View in Poggit][poggit-ci-url] · [Report a bug][issues-url] · [Request a feature][issues-url]
## About The Project
:heavy_check_mark: Provides classes for serialize item
- `kim\present\utils\itemserialize\ItemSerializeUtils`
- `kim\present\utils\itemserialize\SerializeMode`:heavy_check_mark: Provides util function for serialize item
- `ItemSerializeUtils::serialize(Item $item, SerializeMode $mode = SerializeMode::BINARY) : string`
:heavy_check_mark: Provides util function for deserialize item
- `ItemSerializeUtils::deserialize(string $contents, SerializeMode $mode = SerializeMode::BINARY) : Item`
:heavy_check_mark: 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](https://minecraft.fandom.com/wiki/NBT_format#SNBT_format)
format string
- `SerializeMode::JSON` : JSON format string> **NOTE** : JSON mode is not same as `Item::legacyJsonDeserialize()`
-----
## Installation
See [Official Poggit Virion Documentation](https://github.com/poggit/support/blob/master/virion.md)
-----
## How to use?
See [Main Document](https://github.com/presentkim-pm/item-serialize-utils/blob/main/docs/README.md)
-----
## License
Distributed under the **MIT**. See [LICENSE][license-url] for more information
[poggit-ci-badge]: https://poggit.pmmp.io/ci.shield/presentkim-pm/item-serialize-utils/item-serialize-utils?style=for-the-badge
[stars-badge]: https://img.shields.io/github/stars/presentkim-pm/item-serialize-utils.svg?style=for-the-badge
[license-badge]: https://img.shields.io/github/license/presentkim-pm/item-serialize-utils.svg?style=for-the-badge
[poggit-ci-url]: https://poggit.pmmp.io/ci/presentkim-pm/item-serialize-utils/item-serialize-utils
[stars-url]: https://github.com/presentkim-pm/item-serialize-utils/stargazers
[issues-url]: https://github.com/presentkim-pm/item-serialize-utils/issues
[license-url]: https://github.com/presentkim-pm/item-serialize-utils/blob/main/LICENSE
[project-icon]: https://raw.githubusercontent.com/presentkim-pm/item-serialize-utils/main/assets/icon.png