Browse
For agents
About
Assistant – Every Day Productivity Apps
/
trunk
Assistant – Every Day Productivity Apps
vtrunk
Switch version
1.5.5
trunk
0.1.0
0.2.0
0.2.1
0.2.2
0.3.0
0.3.1
0.4
0.4.1
0.4.2
0.5.0
0.5.1
0.6.0
0.7.0
0.7.0.2
0.7.0.3
0.7.0.4
0.7.0.5
0.7.0.6
0.7.0.7
0.7.0.8
0.7.0.9
0.7.1
1.0
All 71 releases
Overview
Code
assistant
/
backend
/
src
/
Helpers
/
JsonHelper.php
JsonHelper.php
in Assistant – Every Day Productivity Apps trunk, at backend/src/Helpers/JsonHelper.php
22 lines
368 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
<
?
php
2
3
namespace
FL
\
Assistant
\
Helpers
;
4
5
class
JsonHelper
{
6
7
/**
8
*
@param
string
$string
9
*
@return
bool
10
*/
11
public
static
function
is_string_json
(
$
string
)
{
12
13
if
(
!
is_string
(
$
string
)
||
trim
(
$
string
)
===
'
'
)
{
14
return
false
;
15
}
16
17
$
decoded
=
json_decode
(
$
string
)
;
18
19
return
is_object
(
$
decoded
)
||
is_array
(
$
decoded
)
;
20
}
21
}
22