PHP JSon How to read boolean value received in JSon format and write in string on PHP

前端 未结 3 1305
感情败类
感情败类 2020-12-21 04:46

I receive this JSON string from another site and I cannot modify what received from. The string is receive in $_POST and is :

[
    {
        \"clientId\":\         


        
3条回答
  •  萌比男神i
    2020-12-21 05:21

    It's a very simple. If you use js to generate and transfer json, pass your variable not in its pure form but: youBoolVar + 0, then false will be 0, and true 1

提交回复
热议问题