From 1f6c89684f69ecc51b6a2d6362bc22f9e3291d81 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Thu, 14 Mar 2024 17:38:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/README.md b/README.md index e69de29..6d38983 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,63 @@ +# PHP JZON # + +This is a small PHP library for parsing JZON documents. + + +## What is JZON? ## + +JZON is a *superset* of JSON which is designed to be actively edited by *humans*. + +PHP JZON features: + +* no need to worry about trailing commas + +* one line comments starting with # + +* simple array keys don't need to be quoted with "" + +* parsing errors are shown in a friendly manner + +### Quick Example ### + +Say, you have the following JZON file example.json: + +``` +["foo", + "bar", + {meaning_of_life: 42, +#NOTE: no comma ahead +# and yes comments are supported! + hey: "bar" + "thatscool": 1 + } +] +``` + +Now you can parse it this way: + +``` + + string(3) "foo" + [1]=> + string(3) "bar" + [2]=> + array(3) { + ["thatscool"]=> + int(1) + ["meaning_of_life"]=> + int(42) + ["hey"]=> + string(3) "bar" + } +} +``` \ No newline at end of file