Edit report at http://bugs.php.net/bug.php?id=54010&edit=1
ID: 54010 Updated by: scott...@php.net Reported by: pan_yong_feng at hotmail dot com Summary: json_decode can not handle data like {"A":0000}, but {"A":0} is fine -Status: Open +Status: Bogus Type: Bug Package: Apache2 related Operating System: Ubuntu PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: I can't reproduce the cpu usage from cli on 5.3.5. Looking at the json spec the number isn't valid. I passed it through a linter too and you get. syntax error, unexpected TNUMBER, expecting '}' Previous Comments: ------------------------------------------------------------------------ [2011-02-14 05:50:38] pan_yong_feng at hotmail dot com e.g. {"S":0000,"Y":5,"G":82.36431503,"T":33.99824477,"A":4,"Ai":0}, ------------------------------------------------------------------------ [2011-02-14 05:47:55] pan_yong_feng at hotmail dot com Description: ------------ I have json data to decode using php api: json_decode(), But I found if there is a number of 0000 instead of 0. Such API will case thread of apache2 take 100% of cpu resource for about 1 mins. I know 0000 is the legal number, but I think there should be a way to indicate that apache cannot handle, instead of just running exhausted. Hoping this is useful for other developer. Thanks a lot. Expected result: ---------------- Send some warning information. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54010&edit=1