如何用"替换null " php中json输出的双引号

时间:2018-04-02 11:01:45

标签: php json

我需要帮助,我们已经为当前项目开发了500多个网络服务,我不想修改所有网络服务,可以帮助我如何用" "使用输出缓冲区在php中输出json的双引号..

实际输出

{
  "err_code": "valid",
  "title": "",
  "message": "User details",
  "data": {
    "fullname": "Vijay Kumarr",
    "mobile": "4564564564654",
    "token": "OGUBXtyxDARNISJGOlQu",
    "customer_meta": {
      "id": "6",
      "customers_id": "6",
      "email": "xyz@abc.com",
      "alternative_mobile": null,
      "door_no": "1-2/3",
      "street_name": "Street",
      "location_name": "Locationn",
      "city_name": "vizag",
      "district_name": "Vizag",
      "state_name": "Andhra Pradesh",
      "zipcode": "530016",
      "countries_id": "1",
      "gst_number": null,
      "aadhar_number": null,
      "pan_number": null,
      "created_at": "1522060789",
      "updated_at": "1522484859",
      "status": "1"
    }
  }
}

我期待输出为

{
  "err_code": "valid",
  "title": "",
  "message": "User details",
  "data": {
    "fullname": "Vijay Kumarr",
    "mobile": "4564564564654",
    "token": "OGUBXtyxDARNISJGOlQu",
    "customer_meta": {
      "id": "6",
      "customers_id": "6",
      "email": "xyz@abc.com",
      "alternative_mobile": "",
      "door_no": "1-2/3",
      "street_name": "Street",
      "location_name": "Locationn",
      "city_name": "vizag",
      "district_name": "Vizag",
      "state_name": "Andhra Pradesh",
      "zipcode": "530016",
      "countries_id": "1",
      "gst_number": "",
      "aadhar_number": "",
      "pan_number": "",
      "created_at": "1522060789",
      "updated_at": "1522484859",
      "status": "1"
    }
  }
}

0 个答案:

没有答案