# Get eror on json object even though same object from test facitity

**URL:** <https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340>\
**Category:** API and Webhooks\
**Created:** [May 19, 2020, 7:11pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340 "2020-05-19T19:11:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![laeggan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laeggan/32/7383_2.png) [@laeggan](https://devforum.zoom.us/u/laeggan)\
**Post date:** [May 19, 2020, 7:11pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/1 "2020-05-19T19:11:15Z")

</div>

trying to update user settings.  
Have seeming valid JSON object as verified by JSON formatter.  
Use identical JSON object that works through API test facility.  
get error 300,“message”:“Request Body should be a valid JSON object.”  
Object is here:  
{  
“email\_notification”: {  
“alternative\_host\_reminder”: 0,  
“cancel\_meeting\_reminder”: 0,  
“jbh\_reminder”: 0,  
“schedule\_for\_reminder”: 0  
},  
“in\_meeting”: {  
“allow\_live\_streaming”: 0,  
“annotation”: 0,  
“attendee\_on\_old”: 0,  
“auto\_saving\_chat”: 1,  
“breakout\_room”: 1,  
“chat”: 1,  
“closed\_caption”: 0,  
“co\_host”: 0,  
“custom\_data\_center\_regions”: 0,  
“e2e\_encryption”: 0,  
“entry\_exit\_chime”: “none”,  
“far\_end\_camera\_control”: 0,  
“feedback”: 1,  
“group\_hd”: 0,  
“non\_verbal\_feedback”: 0,  
“polling”: 1,  
“private\_chat”: 0,  
“record\_play\_voice”: 1,  
“remote\_control”: 0,  
“remote\_support”: 0,  
“show\_meeting\_control\_toolbar”: 1,  
“virtual\_background”: 0,  
“waiting\_room”: 1  
},  
“recording”: {  
“auto\_delete\_cmr”: 0,  
“auto\_recording”: “none”,  
“cloud\_recording”: 1,  
“local\_recording”: 1,  
“record\_audio\_file”: 1,  
“record\_gallery\_view”: 0,  
“record\_speaker\_view”: 1,  
“recording\_password\_requirement”: {  
“have\_letter”: 1,  
“have\_number”: 1,  
“have\_special\_character”: 1,  
“length”: 8,  
“only\_allow\_numeric”: 0  
},  
“save\_chat\_text”: 1,  
“show\_timestamp”: 0  
},  
“schedule\_meeting”: {  
“audio\_type”: “both”,  
“embed\_password\_in\_join\_link”: 1,  
“force\_pmi\_jbh\_password”: 1,  
“host\_video”: 1,  
“join\_before\_host”: 0,  
“not\_store\_meeting\_topic”: 0,  
“participants\_video”: 0,  
“personal\_meeting”: 1,  
“pmi\_password”: “zOLE1”,  
“pstn\_password\_protected”: 1,  
“require\_password\_for\_instant\_meetings”: 1,  
“require\_password\_for\_pmi\_meetings”: “all”,  
“require\_password\_for\_scheduling\_new\_meetings”: 1,  
“use\_pmi\_for\_instant\_meetings”: 0,  
“use\_pmi\_for\_scheduled\_meetings”: 0  
}  
}

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [May 19, 2020, 9:26pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/2 "2020-05-19T21:26:48Z")

</div>

Hi @laeggan, in JSON boolean values can only be either `true` or `false`. `0` or `1` will be returned as invalid. Hope this helps!

Reference: [JSON Schema](https://json-schema.org/understanding-json-schema/reference/boolean.html)

---

<div class="post-metadata">

**Author:** ![laeggan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laeggan/32/7383_2.png) [@laeggan](https://devforum.zoom.us/u/laeggan)\
**Post date:** [May 19, 2020, 10:46pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/3 "2020-05-19T22:46:00Z")

</div>

Using 0 and 1 worked fine for the create meeting API call.  
I changed to true/false and still same error. Here is (JSON checked) new object:  
{“email\_notification”:{“email\_notification”:false,“alternative\_host\_reminder”:false,“cancel\_meeting\_reminder”:false,“jbh\_reminder”:false,“schedule\_for\_reminder”:false},“in\_meeting”:{“allow\_live\_streaming”:false,“annotation”:false,“attendee\_on\_old”:false,“auto\_saving\_chat”:true,“breakout\_room”:true,“chat”:true,“closed\_caption”:false,“co\_host”:false,“custom\_data\_center\_regions”:false,“e2e\_encryption”:false,“entry\_exit\_chime”:“none”,“far\_end\_camera\_control”:false,“feedback”:true,“group\_hd”:false,“non\_verbal\_feedback”:false,“polling”:true,“private\_chat”:false,“record\_play\_voice”:true,“remote\_control”:false,“remote\_support”:false,“show\_meeting\_control\_toolbar”:true,“virtual\_background”:false,“waiting\_room”:true},“recording”:{“auto\_delete\_cmr”:false,“auto\_recording”:“none”,“cloud\_recording”:true,“local\_recording”:true,“record\_audio\_file”:true,“record\_gallery\_view”:false,“record\_speaker\_view”:true,“recording\_password\_requirement”:{“have\_letter”:true,“have\_number”:true,“have\_special\_character”:true,“length”:8,“only\_allow\_numeric”:false},“save\_chat\_text”:true,“show\_timestamp”:false},“schedule\_meeting”:{“audio\_type”:“both”,“embed\_password\_in\_join\_link”:true,“force\_pmi\_jbh\_password”:true,“host\_video”:true,“join\_before\_host”:false,“not\_store\_meeting\_topic”:false,“participants\_video”:false,“personal\_meeting”:true,“pmi\_password”:“zOLEtrue”,“pstn\_password\_protected”:true,“require\_password\_for\_instant\_meetings”:true,“require\_password\_for\_pmi\_meetings”:“all”,“require\_password\_for\_scheduling\_new\_meetings”:true,“use\_pmi\_for\_instant\_meetings”:false,“use\_pmi\_for\_scheduled\_meetings”:false}}

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 22, 2020, 5:17pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/4 "2020-05-22T17:17:29Z")

</div>

Hey @laeggan,

I just tried with your JSON and it worked:

```json
{
  "email_notification": {
    "email_notification": false,
    "alternative_host_reminder": false,
    "cancel_meeting_reminder": false,
    "jbh_reminder": false,
    "schedule_for_reminder": false
  },
  "in_meeting": {
    "allow_live_streaming": false,
    "annotation": false,
    "attendee_on_old": false,
    "auto_saving_chat": true,
    "breakout_room": true,
    "chat": true,
    "closed_caption": false,
    "co_host": false,
    "custom_data_center_regions": false,
    "e2e_encryption": false,
    "entry_exit_chime": "none",
    "far_end_camera_control": false,
    "feedback": true,
    "group_hd": false,
    "non_verbal_feedback": false,
    "polling": true,
    "private_chat": false,
    "record_play_voice": true,
    "remote_control": false,
    "remote_support": false,
    "show_meeting_control_toolbar": true,
    "virtual_background": false,
    "waiting_room": true
  },
  "recording": {
    "auto_delete_cmr": false,
    "auto_recording": "none",
    "cloud_recording": true,
    "local_recording": true,
    "record_audio_file": true,
    "record_gallery_view": false,
    "record_speaker_view": true,
    "recording_password_requirement": {
      "have_letter": true,
      "have_number": true,
      "have_special_character": true,
      "length": 8,
      "only_allow_numeric": false
    },
    "save_chat_text": true,
    "show_timestamp": false
  },
  "schedule_meeting": {
    "audio_type": "both",
    "embed_password_in_join_link": true,
    "force_pmi_jbh_password": true,
    "host_video": true,
    "join_before_host": false,
    "not_store_meeting_topic": false,
    "participants_video": false,
    "personal_meeting": true,
    "pmi_password": "zOLEtrue",
    "pstn_password_protected": true,
    "require_password_for_instant_meetings": true,
    "require_password_for_pmi_meetings": "all",
    "require_password_for_scheduling_new_meetings": true,
    "use_pmi_for_instant_meetings": false,
    "use_pmi_for_scheduled_meetings": false
  }
}

```

Please try the JSON above and let me know if it works.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![laeggan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laeggan/32/7383_2.png) [@laeggan](https://devforum.zoom.us/u/laeggan)\
**Post date:** [May 22, 2020, 5:23pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/5 "2020-05-22T17:23:15Z")

</div>

I tried what you had and I still get the same error:  
{“code”:300,“message”:“Request Body should be a valid JSON object.”}

---

<div class="post-metadata">

**Author:** ![laeggan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laeggan/32/7383_2.png) [@laeggan](https://devforum.zoom.us/u/laeggan)\
**Post date:** [May 22, 2020, 10:34pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/6 "2020-05-22T22:34:00Z")

</div>

I am getting the same problem trying to schedule a meeting. The object works fine when I past it into the test facility, but when I use it from code I get this error:  
{“code”:300,“message”:“Request Body should be a valid JSON object.”}  
I also ran the object through the JSON validate site. Here is the object:  
{“settings”:{“host\_video”:true,“participant\_video”:true,“cn\_meeting”:false,“in\_meeting”:false,“join\_before\_host”:true,“mute\_upon\_entry”:false,“watermark”:false,“use\_pmi”:true,“approval\_type”:0,“registration\_type”:1,“audio”:“voip”,“auto\_recording”:“none”,“enforce\_login”:false,“close\_registration”:false,“waiting\_room”:true,“registrants\_email\_notification”:false,“meeting\_authentication”:false},“type”:2,“timezone”:“America/Anchorage”,“agenda”:“OLE Class”,“topic”:“Humor in the Time of Covid”,“start\_time”:“2020-05-26T13:00:00”,“duration”:45,“password”:“20201523”}

---

<div class="post-metadata">

**Author:** ![laeggan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laeggan/32/7383_2.png) [@laeggan](https://devforum.zoom.us/u/laeggan)\
**Post date:** [May 24, 2020, 12:55am UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/7 "2020-05-24T00:55:06Z")

</div>

Never mind. I got it figured. When going from array object via json\_decode, use 0 for false, 1 for true. Then do not addcslashes() the object.  
Works great.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 28, 2020, 8:43pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/8 "2020-05-28T20:43:15Z")

</div>

Happy to hear you got it working! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:35pm UTC](https://devforum.zoom.us/t/get-eror-on-json-object-even-though-same-object-from-test-facitity/18340/9 "2020-08-21T21:35:27Z")

</div>

Closed on August 21, 2020, 9:35pm UTC


