protected function FormAssemblyRequest::isJson in FormAssembly 7
Helper function check if a string is JSON format.
Parameters
string $string: The string to check.
Return value
bool True if $string is JSON.
1 call to FormAssemblyRequest::isJson()
- FormAssemblyRequest::getForms in includes/
FormAssemblyRequest.php - Get data about available forms. If admin index is in use, get a single page of data.
File
- includes/
FormAssemblyRequest.php, line 389 - Authorizes the current site and handles API requests to FormAssembly.
Class
- FormAssemblyRequest
- @file Authorizes the current site and handles API requests to FormAssembly.
Code
protected function isJson($string) {
json_decode($string);
return json_last_error() == JSON_ERROR_NONE;
}