php json decode without quotes

Solutions on MaxInterview for php json decode without quotes by the best coders in the world

showing results for - "php json decode without quotes"
Angela
27 Aug 2017
1function json_decode_add_quotes_to_keys($s) {                      
2    $s = preg_replace('/(\w+):/i', '"\1":', $s);                   
3    return json_decode($s);                                        
4}