php-array-to-json-js
v0.0.2
Published
Convert PHP Array to JSON.
Downloads
5
Maintainers
Readme
PHP Array to JSON/JS
Features
Convert a PHP Array to JSON (requires node and a php runtime)
Installation
npm
npm install php-array-to-json-js
Yarn
yarn install php-array-to-json-js
Requirements
PHP Array to JSON needs to provide an executable php interpreter in the path.
Does only work in a nodejs environment as spawn
is used to pipe the php array through php json_encode
Usage
ES Modules / ES6
import {phpArray2json} from 'php-array-to-json-js'
const phpArray = '["key"=>[1,"string",,true]]'
const json = phpArray2json(json)
console.log(json) // {"key":[1,"string",,true]}
UMD
const {phpArray2json} = require('php-array-to-json-js')
Roadmap
- [ ]
Contribution
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Built With
no dependencies
License
Distributed under the "bsd-2-clause" License. See LICENSE.txt for more information.