mreweb / jsonc-parser
A JSONC (JSON with Comments) parser for PHP
V1.0.0
2025-12-02 22:37 UTC
Requires
- php: >=8.0
This package is auto-updated.
Last update: 2026-03-30 23:26:01 UTC
README
A simple and efficient JSONC (JSON with Comments) parser for PHP.
It allows you to read JSON files containing comments (// and /* ... */) safely in PHP projects.
Features
- Supports single-line (
//) and multi-line (/* */) comments - Safe: comments inside string values are preserved
- Returns PHP array or object
- Compatible with Laravel and any PHP project
Installation
Install via Composer:
composer require mreweb/jsonc-parser