Doc #63383 [Com]: json_encode options bitmask

From: Date: Wed, 31 Oct 2012 20:22:43 +0000
Subject: Doc #63383 [Com]: json_encode options bitmask
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9039@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63383&edit=1 ID: 63383 Comment by: mail+php at requinix dot net Reported by: raul dot ferras at gmail dot com Summary: json_encode options bitmask Status: Open Type: Documentation Problem Package: Documentation problem Operating System: irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: And while we're on that page the example doesn't include a demo of NUMERIC_CHECK, PRETTY_PRINT, or UNESCAPED_SLASHES. Did you know you can easily submit changes to the online documentation? Look for the [edit] link in the top-right corner of manual pages. Here's a patch with the additions: "json_encode: explain constants, show new ones (bug #63383)" http://edit.php.net/?patchID=755&project=PHP Previous Comments: ------------------------------------------------------------------------ [2012-10-29 10:09:07] raul dot ferras at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.json-encode --- There is no explanation about what does every option bitmask but only examples about their different output. Expected result: ---------------- Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT, JSON_UNESCAPED_UNICODE. * JSON_HEX_QUOT: Encodes '"' into .... * JSON_HEX_TAG: Encodes '<' and '>' into .... .... Actual result: -------------- Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT, JSON_UNESCAPED_UNICODE. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63383&edit=1

« previous php.doc.bugs (#9039) next »