您由于字符串中的新行而出错
$string = '{"projectnumber" : "4444","projecdescription" : "4444", "articles" : [{"position":1, "article_id" : 676, "online_text" : "### Behälter; Band I-III nach indiv. Stückliste, Sprache: DE - Sprache: de"},{"position":2, "article_id" : 681, "online_text" : "### Behälter; Band I-III nach indiv. Stückliste, Sprache: ### - Sprache: en"}]}';$string = preg_replace("/[rn]+/", " ", $string);$json = utf8_enpre($string);$json = json_depre($json);var_dump($json);输出量
object(stdClass)[1] public 'projectnumber' => string '4444' (length=4) public 'projecdescription' => string '4444' (length=4) public 'articles' => array 0 => object(stdClass)[2] public 'position' => int 1 public 'article_id' => int 676 public 'online_text' => string '### Behälter; Band I-III nach indiv. Stückliste, Sprache: DE - Sprache: de' (length=78) 1 => object(stdClass)[3] public 'position' => int 2 public 'article_id' => int 681 public 'online_text' => string '### Behälter; Band I-III nach indiv. Stückliste, Sprache: ### - Sprache: en' (length=79)



