Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.191.232.50
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
jsonlint /
[ HOME SHELL ]
Name
Size
Permission
Action
README.md
2.45
KB
-rw-r--r--
changelog.Debian.gz
828
B
-rw-r--r--
copyright
1.32
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : README.md
JSON Lint ========= [](http://travis-ci.org/Seldaek/jsonlint) Usage ----- ```php use Seld\JsonLint\JsonParser; $parser = new JsonParser(); // returns null if it's valid json, or a ParsingException object. $parser->lint($json); // Call getMessage() on the exception object to get // a well formatted error message error like this // Parse error on line 2: // ... "key": "value" "numbers": [1, 2, 3] // ----------------------^ // Expected one of: 'EOF', '}', ':', ',', ']' // Call getDetails() on the exception to get more info. // returns parsed json, like json_decode() does, but slower, throws // exceptions on failure. $parser->parse($json); ``` You can also pass additional flags to `JsonParser::lint/parse` that tweak the functionality: - `JsonParser::DETECT_KEY_CONFLICTS` throws an exception on duplicate keys. - `JsonParser::ALLOW_DUPLICATE_KEYS` collects duplicate keys. e.g. if you have two `foo` keys they will end up as `foo` and `foo.2`. - `JsonParser::PARSE_TO_ASSOC` parses to associative arrays instead of stdClass objects. Example: ``` $parser = new JsonParser; try { $jsonParser->parse(file_get_contents($jsonFile), JsonParser::DETECT_KEY_CONFLICTS); } catch (DuplicateKeyException $e) { $details = $e->getDetails(); echo 'Key '.$details['key'].' is a duplicate in '.$jsonFile.' at line '.$details['line']; } ``` Installation ------------ For a quick install with Composer use: $ composer require seld/jsonlint JSON Lint can easily be used within another app if you have a [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) autoloader, or it can be installed through [Composer](https://getcomposer.org/) for use as a CLI util. Once installed via Composer you can run the following command to lint a json file or URL: $ bin/jsonlint file.json Requirements ------------ - PHP 5.3+ - [optional] PHPUnit 3.5+ to execute the test suite (phpunit --version) Submitting bugs and feature requests ------------------------------------ Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/jsonlint/issues) Author ------ Jordi Boggiano - <j.boggiano@seld.be> - <http://twitter.com/seldaek> License ------- JSON Lint is licensed under the MIT License - see the LICENSE file for details Acknowledgements ---------------- This library is a port of the JavaScript [jsonlint](https://github.com/zaach/jsonlint) library.
Close