Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114717 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86691 invoked from network); 3 Jun 2021 15:57:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jun 2021 15:57:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AB6EC180211 for ; Thu, 3 Jun 2021 09:10:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Jun 2021 09:10:49 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id f2so6394841wri.11 for ; Thu, 03 Jun 2021 09:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=GzGJfu/ji30YLbqGg7pwOwipbNAVEcG4dL4DF9KWYRE=; b=eqYL1LY0Jg5E9B0qETHf8gNKVIOZ3CPmCzYKZnPMUkujJaErU3utj3QbKNjMMkjYoL yKNoJ4Z4GVM0XPEbAfefbgZI2h59fX0nfkKjOXZ8FQIxYQaCnZLPoNOq5EoyHCp2dlLY dw4DIcPkrBzjfTNmWnu5WXMPfxdQxfDZKlPY8KI1XN/BnNY8CgEWvZ84WStQFazlMhGz WvqDPz/EGsWUAAxR2aQox/6COyth6XaHmdtFGL80shgMBhfJ4ucAx1F1VnRacO1Q1UbR kEw9v0GQg/gaWoyvUcJ/zqkfAsi4Olly20e7XIw8btRccKN3EpNPZTCiANMVxS+1e1jY 6wJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=GzGJfu/ji30YLbqGg7pwOwipbNAVEcG4dL4DF9KWYRE=; b=SglhE4u/6zrN9zEi4xK6bm6FiNvt11PD0FEhNlAn8PHtXB2+26q0hgpgIVnj21OjZD u+RFSFNdZ9G3Tdj5MtIlR2NnGBQz1I+UYfLlelGDiX5G7Iev4PA722nXHxsvmCLUE96B MB5+3cdzPyfP6exonRC87+BvRxE7Z1u8MB+bs5uBGWwN9IJyiIks2pzxGLTOdAZPvxYU RZpGRtowLgNeCSpdnA3ngwk0hg0n04ptce2NUpedHoFOE1cYFUnkKGnoJC+PMFOUYZpT ly2SF4fZYZ7CHi2SEMdWwdCDFCNucFFwdSCVysUpyJTwz0FXWoWcJNkmvnprm0aq7bax dB+A== X-Gm-Message-State: AOAM531WX8Tocd0lqXDv5BtHvhLdbc/yCvx5i3fAAZ7XM44zXXQchCda w/TrxJZpiNJykSN1P7Gq5BY+LsR+EhR+Ve47 X-Google-Smtp-Source: ABdhPJxktbwbTB137O3/xkiHo6lpAmU2yo/ZhWawgHGWMI0gjOXuGzAUUHqA2B4jxXy1g5VJB9t3FA== X-Received: by 2002:a5d:6584:: with SMTP id q4mr723002wru.230.1622736648359; Thu, 03 Jun 2021 09:10:48 -0700 (PDT) Received: from [192.168.2.117] (86-84-29-36.fixed.kpn.net. [86.84.29.36]) by smtp.gmail.com with ESMTPSA id h46sm4459666wrh.44.2021.06.03.09.10.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Jun 2021 09:10:47 -0700 (PDT) To: PHP internals Message-ID: <8de4d96a-75d1-d732-020e-30bce0a5e03d@gmail.com> Date: Thu, 3 Jun 2021 18:10:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: nl Subject: [RFC][Draft] Add json_encode indent parameter From: tdegroot96@gmail.com (Timon de Groot) Hi internals, I'd like to present my RFC for adding the indent parameter to the json_encode function:   https://wiki.php.net/rfc/json_encode_indentation The `string|int $indent = 4` parameter adds the ability to specify the indentation for the JSON encoder. Amount of spaces can be specified by a number and a string can be specified to set a custom indentation like `\t` or whatever. As this is my first RFC (and contribution) for PHP, I'm all kind of new to the process, standards, etc. Please let me know if I could do something better. Looking forward to feedback/input on the RFC. -- Kind regards, Timon de Groot