A JSON Object to PHP Array converter extension for DevToys
Configurable options (defaults in bold):
- Spacing: 2 spaces, 4 spaces, tabs
- Quotes: single or double
- Trailing commas: enable or disable
Input:
{
"null": null,
"false": false,
"true": true,
"string": "string",
"integer": 100,
"float": 1.0,
"array": [1, 2, 3],
"object": {
"a": "one",
"b": "two"
}
}
Output:
<?php
$json = [
'null' => null,
'false' => false,
'true' => true,
'string' => 'string',
'integer' => 100,
'float' => 1.0,
'array' => [
1,
2,
3,
],
'object' => [
'a' => 'one',
'b' => 'two',
],
];
This extension is licensed under the MIT License - see the LICENSE file for details.
- Download the
Mickverm.DevToys.JsonPhpConverter
NuGet package from NuGet.org. - Open DevToys, go to
Manage extensions
, click onInstall an extension
and select the downloaded NuGet package.