private function decodeValue($value)
{
switch (TRUE) {
case $value === 'true':
return TRUE;
case $value === 'false':
return FALSE;
case in_array(substr($value, 0, 1), array('{', '[')):
if ($json = json_decode($value)) {
return $json;
} else {
return NULL;
}
default:
return $value;
}
}