PHP中的JSON到AST解析器
0.0.1
2021-04-25 21:56 UTC
Requires
- php: >=7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.19@dev
- phpunit/phpunit: ^8
- squizlabs/php_codesniffer: ^3.0@dev
This package is auto-updated.
Last update: 2024-09-29 05:56:30 UTC
README
安装
$ composer require midhundevasia/json-ast
用法
<?php
use JsonAst\Parser;
$parser = new Parser();
$parser->parse(
'{"hello" : "World"}',
['loc' => true, 'source' => null]
);
测试
$ ./vendor/bin/phpunit --testdox tests
待办事项
- 编写更多测试用例
- 代码覆盖率
许可
json-ast遵循GNU通用公共许可证(GPLv3)- 有关详细信息,请参阅LICENSE
文件。
致谢
灵感来源于以下仓库。
https://github.com/vtrushin/json-to-ast
https://github.com/vtrushin/code-error-fragment
开发
$ vendor/bin/phpcbf src
$ vendor/bin/php-cs-fixer fix src