Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tacoberu/php-naiacode
De/Serialization text with meta from/to text string.
https://github.com/tacoberu/php-naiacode
Last synced: about 2 months ago
JSON representation
De/Serialization text with meta from/to text string.
- Host: GitHub
- URL: https://github.com/tacoberu/php-naiacode
- Owner: tacoberu
- License: mit
- Created: 2019-03-15T22:01:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T00:50:47.000Z (almost 4 years ago)
- Last Synced: 2024-08-27T03:30:18.583Z (4 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NaiaCode
========De/Serialization text with meta from/to human readable text string.
$str =
"Any-Header: with value
Meta: {"vendor":"zim","ver":"0.4"}
Content-Type: text/x-zim-wikiAnd Lorem ipsum doler ist.";
(new Decoder())->decode($str) == [
"And Lorem ipsum doler ist.",
[
'any-header' => "with value",
'meta' => (object) [
'vendor' => 'zim',
'ver' => '0.4',
],
'content-type' => "text/x-zim-wiki",
]
]And encoding similarly.