javascript - Parse JSON from the body of the POST -


i'm using cameratag.com record video on website. service can send json response server can save data database. don't know how proceed here:

the documentation states please note json repsonse passed in body of post , not form parameters. here example of how parse response in ruby:

data = json.parse(request.raw_post) video_uuid = data["uuid"] 

but don't know how data on javascript. i'm not experienced in js please bare me :)

post sample:

    {   "uuid": "00012710-4b65-0131-ffe6-22000a499ea4",   "camera_uuid": "98373a20-79ee-0130-3e42-1231390fcc11",   "created_at": "2013-12-20t05:25:02.000z",   "percent_complete": 100,   "short_code": "kktb4q",   "metadata": {   },   "state": "published",   "recorded_from": "http://singwho.com",   "publish_type": null,   "formats": [     {       "name": "720p",       "width": 1280,       "height": 720,       "video_url": "https://cameratag.com/videos/00012710-4b65-0131-ffe6-22000a499ea4/720p/mp4.mp4",       "flv_url": null,       "flv_stream": null,       "mp4_url": "https://cameratag.com/videos/00012710-4b65-0131-ffe6-22000a499ea4/720p/mp4.mp4",       "mp4_stream": "rtmp://sa0xpxq1vz1ri.cloudfront.net/cfx/st&mp4:98373a20-79ee-0130-3e42-1231390fcc11/00012710-4b65-0131-ffe6-22000a499ea4_720p.mp4?expires=1436892019&signature=ohvuck0gglsniao~2mvp03ypmb9xcyqnbkmffrazsvwerqtdwf9kcf~fkyg1vqh9hyzdoeadxmszrxpxi2np6fh8ylovfjpfjokbpjeq0z4iwh6hkbwd8hl861ksfkkrebngxsjetg1f8xpxmisrtyhz11g3frozwg42cwkip0w0lqqniwz5hi0yw35agqrn1zbbeyqbbkr~qhw9oylku5k15b0-rnoh~emdxuzgjqhbkggsycxy0d41ak~~co0ocqjd9phe2zfa7qy-jhwwlhr66bqup3g~e3cggo0-vtcphnwrxdtxgnezp~sri~bwrvlljvwpwf5lzxy5bytf1w__&key-pair-id=apkaiyevfimhky7ywgka",       "webm_url": "https://cameratag.com/videos/00012710-4b65-0131-ffe6-22000a499ea4/720p/webm.webm",       "webm_stream": "rtmp://sa0xpxq1vz1ri.cloudfront.net/cfx/st&webm:98373a20-79ee-0130-3e42-1231390fcc11/00012710-4b65-0131-ffe6-22000a499ea4_720p.webm?expires=1436892019&signature=pdl1bubk6qkw-knrm9ghhfaxdnda57s6s0ym1hgm5suhyuls84doxcyz~ljpfd-bjgojdwdeonfv60sqcfkn0cy93bhbs1pk3bnlw-y0vfnmziut8qmewuo60yt8bg7ijdvtph3jmtolay9vfl~zptcx1ljhpkbbizzihuzfmtbchqrgxab19jg6rv8bxrst8ar~euc31xfq4lln-l8g~pkf9s-doqunvyunkv-0hiyidhg4gzzkurnyyz8zvzrh0zktby2c~ddiiakskthvsmfnria9adfwywdcci7y5nun6yvpisurpyqoumpbfii3df84zyyxaa6vhfqu1u3cgw__&key-pair-id=apkaiyevfimhky7ywgka",       "thumbnail_url": "https://cameratag.com/videos/00012710-4b65-0131-ffe6-22000a499ea4/720p/thumb.png",       "small_thumbnail_url": "https://cameratag.com/videos/00012710-4b65-0131-ffe6-22000a499ea4/720p/small_thumb.png",       "state": "completed",       "completed_at": "2013-12-20t05:30:12.000z",       "length": 195     }   ],   "plays": 0 } 


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Chrome Extension: Interacting with iframe embedded within popup -