You are here

function _brightcove_try_json_message in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.module \_brightcove_try_json_message()
2 calls to _brightcove_try_json_message()
brightcove_try in ./brightcove.module
Catches exceptions when interacting with the brightcove wrapper lib.
brightcove_try_client in ./brightcove.module

File

./brightcove.module, line 3417
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function _brightcove_try_json_message($post) {
  $postjson = json_decode($post, TRUE);
  if ($postjson === NULL || !is_array($postjson) || empty($postjson['message'])) {
    return $post;
  }
  return $postjson['message'];
}