RelatedHandlerExtra.php
public function beforeSaveValue($value)
    {
        try
        {
            $value      = Json::encode($value);
        } catch (\Exception $e)
        {
            $value      = "{}";
        }

        return $value;
    }
public function beforeSaveValue($value)
    {
        try
        {
            $value      = Json::encode($value);
        } catch (\Exception $e)
        {
            $value      = "{}";
        }

        return $value;
    }
public function beforeSaveValue ( $ value ) { try { $ value = Json :: encode ( $ value ) ; } catch ( \ Exception $ e ) { $ value = "{}" ; } return $ value ; }
Converting the property value before saving to database

@return $this
Converting the property value before saving to database