在意外"="时,数组到JSON失败


Array to JSON failed on unexpect "="

我试图使JSON发送到webservice。最终的json应该是这样的:

{
  "name": "Pravidlo",
  "partQualities": [
    "A",
    "O",
    "N"
  ],
  "residualValueMax": 100,
  "residualValueMin": 0,
  "selectionStrategy": "MIN_PRICE",
  "suppliers": [
    864,902,903,907,910,911,913,914,915,916,917,957
  ],
  "vehicleAgeMax": 100,
  "vehicleAgeMin": 0
}

我所做的尝试:

    $data = array (
        "name" => "Pravidlo",           
        "partQualities" => array(
            'A', 'O', 'N'
        ),          
        "residualValueMax" = "100",
        "residualValueMin" = "0",
        "selectionStrategy" = "MIN_PRICE",
        "suppliers" = array(
            864,902,903,907,910,911,913,914,915,916,917,957
        ),   
        "vehicleAgeMax" = "100",
        "vehicleAgeMin" = "0"
    );                      
    // json encode data
    $data_string = json_encode($data);

我如何在residalvaluemax和100之间获得"意外"=的错误。有人能告诉我如何创建这样的JSON吗?由于

需要将数组声明中的=替换为=>

使用 => = 为一个数组。