My application receives a JSON request from a different application with maximum 18 digit floating point value. Now when i try to decode the JSON request data the floating point value with digit greater than 12 gets round off to maximum 12 digits but my application should need to handle the request and treat the floating point number with same precision as this value is used to verify the authenticity of the request.
{
"value2": 12.2256,
"value": 18.4446359017678
}
after JSON_DECODE gets converted to
array("value" => 18.444635901768, "value2" => 12.2256)
. Please advise as i have already used the ini_set('precision' 18) but it converts all the floating point number to 18 digits. Thank you