note 129783 added to json.constants

From: Date: Sat, 28 Sep 2024 18:01:45 +0000
Subject: note 129783 added to json.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-221566@lists.php.net to get a copy of this message
Warning about JSON_NUMERIC_CHECK and scientific notation. JSON_NUMERIC_CHECK will remove scientific notation. Thus, json_encode(['scientificNumber' => '1e-4'], JSON_NUMERIC_CHECK); will return {"scientificNumber":0.0001} You have to account for this, as it may defeat the whole purpose of scientific notation. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 139.47.32.42) ---- Manual Page -- https://php.net/manual/en/json.constants.php Edit -- https://main.php.net/note/edit/129783 Del: integrated -- https://main.php.net/note/delete/129783/integrated Del: useless -- https://main.php.net/note/delete/129783/useless Del: bad code -- https://main.php.net/note/delete/129783/bad+code Del: spam -- https://main.php.net/note/delete/129783/spam Del: non-english -- https://main.php.net/note/delete/129783/non-english Del: in docs -- https://main.php.net/note/delete/129783/in+docs Del: other reasons-- https://main.php.net/note/delete/129783 Reject -- https://main.php.net/note/reject/129783 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221566) next »