[PHP-DEV] Re: json_encode() x-notation

2018-07-04 Thread Andrea Faulds
Hi, Andrea Faulds wrote: Hi David, David Rodrigues wrote: ​Hello. I saw that JS supports the x-notation (\x40) and u-notation (\u0040), but PHP only supports u-notation. There some reason for that? JSON.parse('"\x40"'); // => @ JSON.parse('"\u0040"'); // => @ While PHP: json_decode('"\\u004

[PHP-DEV] Re: json_encode() x-notation

2018-07-04 Thread Andrea Faulds
Hi David, David Rodrigues wrote: ​Hello. I saw that JS supports the x-notation (\x40) and u-notation (\u0040), but PHP only supports u-notation. There some reason for that? JSON.parse('"\x40"'); // => @ JSON.parse('"\u0040"'); // => @ While PHP: json_decode('"\\u0040"'); // => @ json_decode('

Re: [PHP-DEV] Re: json_encode option for not escaping unnecessary character

2011-08-18 Thread Александр Москалёв
I know that molestation is evil, but how's my patch? ) I would really like to see this functionality in php 5.4. In many projects with utf8, we are forced to use non native json_encode now With regards, Alexander Moskaliov ir...@irker.net 2011/8/4 Scott MacVicar : > Never got the email, will l

Re: [PHP-DEV] Re: json_encode option for not escaping unnecessary character

2011-08-04 Thread Александр Москалёв
Hi, Scott. I wrote you on scott...@php.net. This patch - my first work on C language. I write it becouse people advised me write patch for fast feature adding. I also tried add minimal changes. If you spend a little time to check and fix my patch, I would be very thankful to you. With regards, Ale

Re: [PHP-DEV] Re: json_encode option for not escaping unnecessary character

2011-08-04 Thread Scott MacVicar
Never got the email, will look today at it. Doesn't quite match our coding standards from the first glance. S On 4 Aug 2011, at 09:17, Александ Москалёв wrote: > I write to omar (ext author) and scottmac (bug owner) and not received > a reply from they. > > Can someone else check this patch, p

[PHP-DEV] Re: json_encode option for not escaping unnecessary character

2011-08-04 Thread Александр Москалёв
I write to omar (ext author) and scottmac (bug owner) and not received a reply from they. Can someone else check this patch, please? With regards, Alexander Moskaliov ir...@irker.net 2011/7/25 Александр Москалёв : > Hello. Can someone check my patch in this > request https://bugs.php.net/bug.p

[PHP-DEV] Re: json_encode()

2008-12-16 Thread Karsten Dambekalns
Hi. On 15.12.2008 18:50 Uhr, Rasmus Lerdorf wrote: Ok, so as promised I ran some of the options we have that came up last week by Douglas Crockford. 1. Document the fact that if you want to strictly conform to the JSON spec and be sure your json_encode output will work in various JSON p

[PHP-DEV] Re: json_encode() bug

2008-02-01 Thread Gaetano Giunta
Stanislav Malyshev wrote: ... The question is - should we have an error there? If so, which one - E_WARNING, E_NOTICE? I'm for E_WARNING. +1 Also please add at least a warning when errors are found in decoding process, so that it is somewhat feasible to distinguish a bad decode from json_de

[PHP-DEV] Re: json_encode() bug

2008-01-25 Thread Nathan Rixham
quick work around for now.. base64_decode(json_decode(json_encode(base64_encode("ab\xE0\" something" Stanislav Malyshev wrote: Hi! Right now, if json_encode sees wrong UTF-8 data, it just cuts the string in the middle, no error returned, no message produced. Example: var_dump(json_encode