public function addHintedAttributes()
{
foreach ($this->hintedJsonAttributes as $col => $structure) {
if (!$this->showJsonColumns) {
$this->hidden[] = $col;
}
if (json_decode($structure) === null) {
throw new InvalidJsonException();
}
$obj = json_decode($structure);
if (is_object($obj)) {
foreach ($obj as $key => $value) {
$this->flagJsonAttribute($key, $col);
if ($this->showJsonAttributes) {
$this->appends[] = $key;
}
}
}
}
}