在PHP中将键值POST转换为数据二进制

在PHP中将键值POST转换为数据二进制,php,curl,Php,Curl,以下是我的API提供的示例: curl 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items' \ -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \ -H 'accept-version: 1.0.0' \ -H "Content-Type: application/json"

以下是我的API提供的示例:

curl 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
  "fields": {
    "name": "Exciting blog post title",
    "slug": "exciting-post",
    "_archived": false,
    "_draft": false,
    "color": "#a98080",
    "author": "580e640c8c9a982ac9b8b778",
    "post-body": "<p>Blog post contents...</p>",
    "post-summary": "Summary of exciting blog post",
    "main-image": "580e63fe8c9a982ac9b8b749"
  }
}'
我的json编码如下所示:

{"fields":{"region":"Saskatchewan","first-name":"Steven","last-name":"Gauerke","phone-number":"7705333580","email-address":"steven@chalamministries.com","first-name-spouse":"Daniel","last-name-spouse":"Canup","phone-number-spouse":"","email-address-spouse":"daniel@finidev.com","home-address":"Lamar Giles Rd","city":"Winder","province":"Georgia","active":"false"}}

我看到其他人都在谈论@,但在这个例子中有一个$

可能重复No,因为它是一个字符串。我该怎么做才能让它看起来像上面的东西?
{"fields":{"region":"Saskatchewan","first-name":"Steven","last-name":"Gauerke","phone-number":"7705333580","email-address":"steven@chalamministries.com","first-name-spouse":"Daniel","last-name-spouse":"Canup","phone-number-spouse":"","email-address-spouse":"daniel@finidev.com","home-address":"Lamar Giles Rd","city":"Winder","province":"Georgia","active":"false"}}