[php-src] Issue #10433: Better handling of floats with json_encode

From: Date: Tue, 24 Jan 2023 15:36:35 +0000
Subject: [php-src] Issue #10433: Better handling of floats with json_encode
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243555@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10433
Author: tgeene

### Description

When using the function json_encode it will sometime lose all precision on floats being
used as values. It would be nice if a new constant was added that handled similar to
JSON_BIGINT_AS_STRING such as JSON_FLOAT_AS_STRING. I recommend this
solution as I don't know if simply maintain precision would be possible given the underlying
code of PHP. 


Thread (1 message)

  • tgeene
« previous php.bugs (#243555) next »