includes/functions.php
changeset 1167 3c73e1b6d33f
parent 1159 a1cca4472a58
child 1183 15957df91ea4
equal deleted inserted replaced
1166:b20ec1599bfe 1167:3c73e1b6d33f
  4788           '#^\s*/\*(.+)\*/#Us',
  4788           '#^\s*/\*(.+)\*/#Us',
  4789           // eliminate multi-line comments in '/* ... */' form, at end of string
  4789           // eliminate multi-line comments in '/* ... */' form, at end of string
  4790           '#/\*(.+)\*/\s*$#Us'
  4790           '#/\*(.+)\*/\s*$#Us'
  4791         ), '', $json);
  4791         ), '', $json);
  4792     
  4792     
  4793   $json = preg_replace('/([,\{\[])([\s]*?)([a-z0-9_]+)([\s]*?):/', '\\1\\2"\\3" :', $json);
  4793   $json = preg_replace('/([,\{\[])(?:[\r\n]+)([\s]*?)([a-z0-9_]+)([\s]*?):/', '\\1\\2"\\3" :', $json);
  4794   
  4794   
  4795   return $json;
  4795   return $json;
  4796 }
  4796 }
  4797 
  4797 
  4798 /**
  4798 /**