Process the json column.

@param string $column_name
@param mixed  &$value

@return void

@SuppressWarnings(PHPMD.StaticAccess)
542997
public function processJson($column_name, &$value)
    {
        if (empty($value) || $value === 'null') {
            $value = [];
        }
        $defaults = (!empty($this->json_defaults[$column_name])) ? $this->json_defaults[$column_name] : [];
        $options = (!empty($this->json_options[$column_name])) ? $this->json_options[$column_name] : [];

        // Only create the json value object if it hasn't been done already.
        if (!isset($this->json_values[$column_name]) || !is_object($this->json_values[$column_name])) {
            $this->json_values[$column_name] = new JsonColumnValue($value, $defaults, $options);
            $json_column_access = function &($column_name) {
                return $this->json_values[$column_name];
            };
            $this->json_methods[$column_name] = Closure::bind($json_column_access, $this, static::class);
        }
    }
106510
public function addColumn($name, $value)
    {
        if (isset($this[$name])) {
            throw new Exception("Column $name already in the array!");
        }
        $this->setColumn($name, $value);
    }
1051783
public function findBy($attribute, $value, $columns = ['*'])
    {
        return $this->postProcess( parent::findBy($attribute, $value, $columns) );
    }
1101979
public function renderAdminColumn($column_name, $term_id)
    {
        $this->load($term_id);
        parent::renderAdminColumn($column_name, $term_id);
    }
399819
public function column($name, $value = null)
    {
        if (is_null($value)) {
            $column = Arr::get($this->data, $name);

            return $this->output($column);
        }

        if ($value instanceof Closure) {
            $value = $value->call($this, $this->column($name));
        }

        Arr::set($this->data, $name, $value);

        return $this;
    }
920188
private static void insertJsonColumn(CqlSession session) {

    JsonObject alice = Json.createObjectBuilder().add("name", "alice").add("age", 30).build();

    JsonObject bob = Json.createObjectBuilder().add("name", "bob").add("age", 35).build();

    // Build and execute a simple statement
    Statement stmt =
        insertInto("examples", "json_jsr353_column")
            .value("id", literal(1))
            // the JSON object will be converted into a String and persisted into the VARCHAR column
            // "json"
            .value("json", literal(alice, session.getContext().getCodecRegistry()))
            .build();
    session.execute(stmt);

    // The JSON object can be a bound value if the statement is prepared
    // (subsequent calls to the prepare() method will return cached statement)
    PreparedStatement pst =
        session.prepare(
            insertInto("examples", "json_jsr353_column")
                .value("id", bindMarker("id"))
                .value("json", bindMarker("json"))
                .build());
    session.execute(
        pst.bind()
            .setInt("id", 2)
            // note that the codec requires that the type passed to the set() method
            // be always JsonStructure, and not a subclass of it, such as JsonObject
            .set("json", bob, JsonStructure.class));
  }
32588
public function setRawColumnValue(string $name, $value): void
	{
		$this->columns[$name] = $this->cast($name, $value);
	}
1162724
public void writeValue (String name, Object value) {
		try {
			writer.name(name);
		} catch (IOException ex) {
			throw new JsonException(ex);
		}
		if (value == null)
			writeValue(value, null, null);
		else
			writeValue(value, value.getClass(), null);
	}
419362
protected function _updateColumns ($table_name) {
		$auto_increment_column_name = null;
		$stmt	= $this->prepare('SELECT sql FROM sqlite_master WHERE type = ? AND tbl_name = ?');
		$stmt->execute(['table', $table_name]);
		$schema = $stmt->fetch(\PDO::FETCH_ASSOC)['sql'];
		if (preg_match("/^\s*([^\s]+).*\s+AUTOINCREMENT\s*(?:,|\))/mi", $schema, $mathes) !== 0) {
			$auto_increment_column_name = $mathes[1];
		}

		$pdo_param_list = $this->GetPdoParamList();

		$this->_columns[$table_name] = [];
		foreach ($this->query(sprintf('PRAGMA table_info(%s);', $table_name), \PDO::FETCH_ASSOC) as $columns) {
			$this->_columns[$table_name][$columns['name']] = [
				'column_name'		=> $columns['name'],
				'type'				=> $columns['type'],
				'not_null'			=> filter_var($columns['notnull'], FILTER_VALIDATE_BOOLEAN),
				'default'			=> $columns['dflt_value'],
				'auto_increment'	=> $auto_increment_column_name === $columns['name'],
				'comment'			=> '',
				'primary_key'		=> $columns['pk'],
				'raw_data'			=> $columns,
				'pdo_param'			=> $pdo_param_list[$columns['type']],
			];
		}
	}
744733
function setColumnValue($column_name, $value, $column_type = null) {
		if (null === $column_type) {
			$column_type = static::getColumnType($column_name);
		}

		static $true = array(true, 1, '1', 'on', 'true');
		static $false = array(false, 0, '0', 'off', 'false');

		if ($column_type === self::COLUMN_TYPE_BOOLEAN) {
			if (is_string($value)) {
				$value = strtolower($value);
			}
			if (in_array($value, $true, true)) {
				$value = 1;
			} elseif (in_array($value, $false, true)) {
				$value = 0;
			} elseif ($value === '' || $value === null) {
				$value = null;
			} else {
				throw new InvalidArgumentException($value . ' is not a valid boolean value');
			}
		} else {
			$temporal = static::isTemporalType($column_type);
			$numeric = static::isNumericType($column_type);

			if ($numeric || $temporal) {
				if (is_string($value)) {
					$value = trim($value);
				}
				if ('' === $value) {
					$value = null;
				} elseif (null !== $value) {
					if ($temporal) {
						$value = static::coerceTemporalValue($value, $column_type, static::getConnection());
					} elseif ($numeric) {
						if (is_bool($value)) {
							$value = $value ? 1 : 0;
						} elseif (static::isIntegerType($column_type)) {
							// validate and cast
							if (!is_int($value)) {
								$int_val = intval($value);
								if ((string) $int_val != (string) $value) {
									throw new InvalidArgumentException($value . ' is not a valid integer or it is too large');
								}
								$value = $int_val;
							}
						} else {
							// only validates, doesn't cast...yet
							$float_val = floatval($value);
							if ((string) $float_val != (string) $value) {
								throw new InvalidArgumentException($value . ' is not a valid float or it is too large');
							}
						}
					}
				}
			}
		}

		if ($this->$column_name !== $value) {
			$this->_modifiedColumns[$column_name] = $column_name;
			$this->$column_name = $value;
		}
		return $this;
	}
844943
public function inspectJson()
    {
        if (!empty($this->json_columns)) {
            foreach ($this->json_columns as $column_name) {
                if (!in_array($column_name, static::$protected_columns)) {
                    $this->processJson($column_name, $this->attributes[$column_name]);
                }
            }
        }
    }
848437
protected function processNodeProperty($name, $value, array &$properties)
    {
        // If this is a nested item
        if (is_object($value)) {
            $this->processNodePropertyObject($name, $value, $properties);

            // Else: If this is a value list
        } elseif (is_array($value)) {
            foreach ($value as $listValue) {
                $this->processNodeProperty($name, $listValue, $properties);
            }

            // Else: If the value is not empty
        } elseif ($value) {
            $properties[$name]->values[] = $value;
        }
    }
921171
void addValue(String columnName, String value)
    {
        addValue(columnNames.indexOf(columnName), value);
    }
168419
protected function processArray($value, $json = false)
    {
        if (is_array($value)) {
            
            if ($this->isCallbackArray($value)) {
                return $this->processCallbackArray($value);
            }
            
            return $json ? json_encode($value) : implode(', ', $value);
            
        }
        
        return $value;
    }
979618
def process_column(self, idx, value):
        ""
        if value is not None:
            value = str(value).decode(self.encoding)
        return value
366347
public function set($key, $value, $index_name = null)
	{
		list($index_name, $key) = $this->normalizeAccessKey($key, $index_name);

		$this->items[$index_name][$key] = $value;
	}
295195
function column_style($column, $property, $value) {
        if (isset($this->column_style[$column])) {
            $this->column_style[$column][$property] = $value;
        }
    }