varaey / serializer
This is a php module. It convert object arguments to few formats, like json, xml, yaml
1.0.0
2019-04-25 07:11 UTC
Requires
- symfony/yaml: ^3.2
This package is auto-updated.
Last update: 2024-04-29 04:13:13 UTC
README
This library convert Object props to needed format.
Like:
- JSON
- Yaml
- XML
How to use:
- do next command (in terminal) in current directory (for install needed libraries)
composer install
- for start test, use next command (in terminal) in current directory
php tests/start.php
Description
For converting Object to JSON:
<?php $toJson = new SerializeToJson(new Object); echo $toJson->getResult();
For converting Object to Yaml:
<?php $toYaml = new SerializeToYaml(new Object); echo $toYaml->getResult();
For converting Object to XML:
<?php $toXml = new SerializeToXml(new Object); echo $toXml->getResult();
Best regards, Your student Kuzemskyi S