Convert CSS JSON to array

@return mixed
@throws \common_exception_MissingParameter
@throws \common_exception_InvalidArgumentType
170785
private function getCssArray() {
        if (!$this->hasRequestParameter('cssJson')) {
            throw new common_exception_MissingParameter('cssJson', __CLASS__.'::'.\Context::getInstance()->getActionName());
        }
        $cssArr = json_decode($_POST['cssJson'], true);
        if(!is_array($cssArr)) {
            throw new common_exception_InvalidArgumentType(__CLASS__,\Context::getInstance()->getActionName(), 0, 'json encoded array');
        }
        return $cssArr;

    }
1351311
public function toArray()
    {
        if ($this->getResponseType() == 'application/json')
        {
            $response = $this->convertJsonToArray($this->getBody());
        }
        elseif ($this->getResponseType() == 'application/binary')
        {
            $response = $this->convertSerializedToArray($this->getBody());
        }
        else
        {
            $response = null;
        }

        if ( ! is_array($response))
        {
            $this->throwResponseConversionException();
        }

        return $response;
    }
482599
public function jsonSerialize()
    {
        $data = [];

        if ($this->provider->includeMenuInResponse()) {
            $collection = $this->provider->getTreeCollection($this->provider->getRequestedSiteTree());
            $formatter = new TreeCollectionJsonFormatter($collection);
            $data['trees'] = $formatter;
            $data['children'] = $this->provider->getRequestedNodes();
            $siteTree = $this->provider->getRequestedSiteTree();
            $data['homeCID'] = $siteTree === null ? null : ((int) $siteTree->getSiteHomePageID() ?: null);
        } else {
            return $this->provider->getRequestedNodes();
        }

        return $data;
    }
868037
public function toJson()
    {
        $data = [];

        foreach ($this->attributes as $key => $value) {
            if (!in_array($key, $this->hidden)) {
                $data[$key] = $value;
            }
        }

        return json_encode($data);
    }
233430
function jsonSerialize()
    {
        $result = [
            'title'        => $this->getTitle(),
            'link'         => $this->getLink(),
            'publicId'     => $this->getPublicId(),
            'description'  => $this->getDescription(),
            'lastModified' => $this->getLastModified()->format(\DateTime::ATOM),
            'url'          => $this->getUrl(),
            'items'        => $this->getItems(),
            'relations'    => $this->getRelations(),
        ];
        return $result;
    }
434277
public function jsonSerialize()
    {
        $ret = new stdClass();
        $ret->code = $this->errorCode;
        $ret->message = $this->getUserMessage();

        return $ret;
    }
36408
public function to_json() {
		parent::to_json();
		foreach ( $this->input_attrs as $attr => $value ) {
			if ( 'style' !== $attr ) {
				$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
				continue;
			}
			$this->json['labelStyle'] = 'style="' . esc_attr( $value ) . '" ';
		}
	}
325929
public function toJson ()
    {
        $rows    = array_map("str_getcsv", explode("\n", trim($this->data)));
        $columns = array_shift($rows);
        $csv     = array();

        foreach ($rows as $row)
        {
            $csv[] = array_combine($columns, $row);
        }

        return json_encode($csv);
    }
616971
public function jsonSerialize() { // @codingStandardsIgnoreLine (CONTRIB-6469).
        $data = [
            'label' => $this->label,
            'labels' => $this->labels,
            'type' => $this->type,
            'values' => $this->values,
            'colors' => $this->colors,
            'axes' => [
                'x' => $this->xaxis,
                'y' => $this->yaxis,
            ],
            'smooth' => $this->smooth
        ];
        return $data;
    }
1161410
public function jsonSerialize() {
    $valid = (!isset($this->textColor) ||
        $this->validateTextColor($this->textColor)) &&
      (!isset($this->textTransform) ||
        $this->validateTextTransform($this->textTransform)) &&
      (!isset($this->backgroundColor) ||
        $this->validateBackgroundColor($this->backgroundColor)) &&
      (!isset($this->verticalAlignment) ||
        $this->validateVerticalAlignment($this->verticalAlignment));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
1166131
public function jsonSerialize() {
    $valid = (!isset($this->backgroundColor) ||
        $this->validateBackgroundColor($this->backgroundColor)) &&
      (!isset($this->opacity) ||
        $this->validateOpacity($this->opacity));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
55668
public function toArray()
    {
        $result = ['jsonrpc' => '2.0'];
        if ($this->id) {
            $result['id'] = $this->id;
        }
        if ($this->isError) {
            $result['error'] = $this->result;
        } else {
            $result['result'] = $this->result;
        }

        return $result;
    }
981361
public function toJson()
    {
        array_walk_recursive($this->params, function (&$value) {
            $value = (string) $value;
        });
        return json_encode($this->params);
    }
1100699
public function jsonSerialize() { // @codingStandardsIgnoreLine (CONTRIB-6469).
        return [
            'label' => $this->label,
            'labels' => $this->labels,
            'max' => $this->max,
            'min' => $this->min,
            'position' => $this->position,
            'stepSize' => $this->stepsize,
        ];
    }
816811
public function jsonSerialize() {
    $valid = (!isset($this->textColor) ||
        $this->validateTextColor($this->textColor)) &&
      (!isset($this->backgroundColor) ||
        $this->validateBackgroundColor($this->backgroundColor));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
392256
public function jsonSerialize() {
        $ret = new \stdClass();
        $requiredTargetAttributes = array();
        $requiredTargetAttributes['requiredTargetAttributes'] = $this->requiredTargetAttributes;
        $ret->requiredTargetAttributes = $requiredTargetAttributes;
        $ret->targetAttributes = $this->targetAttributes;

        return $ret;
    }
128677
public function toArray()
    {
        $target = $this->getTarget();
        if (empty($target)) throw new \Exception('The target is not defined');

        $map = [];
        foreach ($this->services as $service) {
            $map = array_merge($map, $service->toArray());
        }
        return $this->formatRespond($map);
    }