php-array-to-json-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Built With

no dependencies

License

Distributed under the "bsd-2-clause" License. See LICENSE.txt for more information.

Package Sidebar

Install

npm i php-array-to-json-js

Weekly Downloads

1

Version

0.0.2

License

BSD-2-Clause

Unpacked Size

8.3 kB

Total Files

10

Last publish

Collaborators

  • aheissenberger