Doc #60418 [NEW]: json_encode() => Object and Array conversion behavior
| From: | alain dot laporte12345 at gmail dot com | Date: | Wed, 30 Nov 2011 13:24:03 +0000 |
| Subject: | Doc #60418 [NEW]: json_encode() => Object and Array conversion behavior | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-7488@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: 5.3.8
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:json_encode() => Object and Array conversion behavior
Description:
------------
---
From manual page:
http://www.php.net/function.json-encode#refsect1-function.json-
encode-notes
---
The behavior about conversion in object when an array have no consecutive
keys is
not clear in the documentation.
We must use array_values() function to reinitialize keys, before to call
json_encode().
This behavior should be explicited in the "notes" section.
--
Edit bug report at https://bugs.php.net/bug.php?id=60418&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60418&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60418&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60418&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60418&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60418&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60418&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60418&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60418&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60418&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60418&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60418&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60418&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60418&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60418&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60418&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60418&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60418&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60418&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60418&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60418&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60418&r=mysqlcfg