[PHP-DEV] [RFC][Vote] Add json_encode indent parameter

2022-07-04 Thread Timon de Groot
Hi internals, I went with Jakub's advice and opened the vote, not getting into any other adjustments to the RFC prior to opening it for vote. The vote for the json_encode 'indent' parameter is now open. It will run until 15 July. RFC: https://wiki.php.net/rfc/json_encode_indentation. Kind

Re: [PHP-DEV] [RFC] Add json_encode indent parameter

2022-07-04 Thread Timon de Groot
As a flag can't really hurt, I'm thinking of going with option B before starting the vote. Also agree with ignoring the indent parameter, as a tab character is less dependent on how much it is repeated. Kind regards, Timon On 04-07-2022 03:22, Kevin Israel wrote: On 7/3/22 18:01, Jakub

Re: [PHP-DEV] [RFC] Add json_encode indent parameter

2022-07-04 Thread Timon de Groot
, May 13, 2022 at 2:33 PM Timon de Groot <mailto:tdegroo...@gmail.com>> wrote: Hi internals, Almost a year ago I first proposed my RFC draft to introduce a new json_encode parameter 'indent'. I have received a lot of feedback on the change, very insightful. The fee

[PHP-DEV] [RFC] Add json_encode indent parameter

2022-05-13 Thread Timon de Groot
Hi internals, Almost a year ago I first proposed my RFC draft to introduce a new json_encode parameter 'indent'. I have received a lot of feedback on the change, very insightful. The feedback can be boiled down to: - Accepting user input characters means you could create invalid JSON. Do we

[PHP-DEV] [RFC][Draft] Add json_encode indent parameter

2021-06-03 Thread Timon de Groot
. -- Kind regards, Timon de Groot -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] json_encode indent parameter

2021-06-03 Thread Timon de Groot
her particpants think about such behavior. Thank you for your feedback :). -- Kind regards, Timon de Groot -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] json_encode indent parameter

2021-06-03 Thread Timon de Groot
On 3-6-2021 16:15, G. P. B. wrote: That's incorrect, as of PHP 8.0 Fast ZPP has a way to deal with the most common union types, including int|string. Best regards, George P. Banyard I found that STR_OR_LONG works fine, thanks for acknowledging! -- Kind regards, Timon de Groot -- PHP

[PHP-DEV] RFC karma for tdgroot

2021-06-03 Thread Timon de Groot
I'm requesting RFC karma for my proposal in discussion '[PHP-DEV] json_encode indent parameter'. For those interested in my public profile, please see my Github profile: https://github.com/tdgroot. If you have any questions, please let me know! -- Kind regads, Timon de Groot -- PHP

Re: [PHP-DEV] json_encode indent parameter

2021-06-03 Thread Timon de Groot
ans a zval needs to be used, with the possibility to pass any type of variable (please correct me if I'm wrong here). Should the function throw an error when it receives anything other than a string|int? -- Kind regards, Timon de Groot -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] json_encode indent parameter

2021-06-03 Thread Timon de Groot
So if you do go ahead and make an RFC for this, I think my preference would be as a new parameter on json_encode accepting a positive integer. Thank your for your input, I'll start working on an RFC to introduce a new parameter for json_encode. -- PHP Internals - PHP Runtime Development

[PHP-DEV] json_encode indent parameter

2021-06-02 Thread Timon de Groot
work when the JSON_PRETTY_PRINT option is not passed? 3. What do you think of adding json_encode options instead, like   JSON_PRETTY_PRINT_INDENT_2 and JSON_PRETTY_PRINT_INDENT_4? Looking forward to you replies and feedback! -- Kind regards, Timon de Groot -- PHP Internals - PHP Runtime