As much i understand below is my input:
1) The value you providing is float
value. It's float problem not json
problem.
2) The workaround is you can wrap your value in double quotes "28.67167520663993"
. It will give you proper output. Code shown below
$a = '{"lat":"28.67167520663993","lng":"77.23913223769534"}';
print_r(json_decode($a,true));
3) Float is going to round till 3 digit precision
by default in my system.
4) Another method to prevent set ini_set('precesion',15)
. It will not round up till 15 digits.
<?php
ini_set('precision', 15);
$a = '{"lat":28.67167520663993,"lng":77.23913223769534}';
print_r(json_decode($a,true));
5) Bugs already reported here. Above is different way of prevention till php introduce some solution for it.