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

0.0.9 • Public • Published

PHP Array from JSON/JS

Create PHP Array from JSON or JavaScript object notation Code.

Installation

npm

npm install php-array-from-json-js

Yarn

yarn install php-array-from-json-js

Usage

ES Modules / ES6

import {json2phpArray,js2phpArray} from 'php-array-from-json-js'

const json = '{"key":[1,"string",true]}'
const phparray = json2phpArray(json)
console.log(phparray) // ["key"=>[1,"string",true]]

const js = '{key:[1,"string",null,,true]}'
const phparray = js2phpArray(js)
console.log(phparray) // ["key"=>[1,"string",null,null,true]]

UMD

const {json2phpArray} = require('php-array-from-json-js')

Roadmap

  • [ ] support for function output in js2phpArray
  • [ ] options to ignore errors from not supported types

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

development with Vitejs is based on this documentation

License

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

Package Sidebar

Install

npm i php-array-from-json-js

Weekly Downloads

0

Version

0.0.9

License

BSD-2-Clause

Unpacked Size

5.9 kB

Total Files

9

Last publish

Collaborators

  • aheissenberger