Returns this as a json object to be sent to qcubed.js during ajax drawing.
@return mixed
181415
public function jsonSerialize()
    {
        $a[Helper::JSON_OBJECT_TYPE] = 'qFunc';
        $a['func'] = $this->strFunctionName;
        if ($this->strContext) {
            $a['context'] = $this->strContext;
        }
        if ($this->params) {
            $a['params'] = $this->params;
        }

        return Helper::makeJsonEncodable($a);
    }
1091527
public function json()
    {
        $field = $this;

        return $this->unescape()->as(function ($value) use ($field) {
            $content = json_decode($value, true);

            if (json_last_error() == 0) {
                $field->border = false;

                return '<pre><code>'.json_encode($content, JSON_PRETTY_PRINT).'</code></pre>';
            }

            return $value;
        });
    }
703104
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'text' => $this->getText(),
                'html' => $this->getHtml()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
381532
private function packageJSON() {
        return new JsonObject(
            trim(substr($this->stream, 0, ++$this->cursor)),
            ++$this->object_num
        );
    }
485817
public function getContentJson()
    {
        $content = $this->getContent();

        // Remove unwanted utf8 BOM
        if(substr($content, 0, 3) == pack('CCC', 239, 187, 191)) {
            $content = substr($content, 3);
        }

        $json = json_decode($content, true);
        if (null === $json) {
            throw new LogicException("Response content is not valid json: \n\n".$content);
        }

        return $json;
    }
1185196
public function toJson() {
		$array = array("types"=>array());
		foreach ($this->types as $type) {
			$array["types"][] = $type->toJson();
		}
		if ($this->warningMessage) {
			$array["warning"] = $this->warningMessage;
		}
		return $array;
	}
1147553
function jsonSerialize()
    {
        $data = [
            'text' => $this->text
        ];

        if ($this->replyMarkup) {
            $data['reply_markup'] = $this->replyMarkup;
        }

        return $data;
    }
1279122
public function json() {
		$array = wp_array_slice_assoc( get_object_vars( $this ),
			[ 'id', 'description', 'priority', 'panel', 'options' ]
		);

		$array['title']    = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
		$array['active']   = $this->active();
		$array['instance'] = $this->instance_number;

		return $array;
	}
823502
public function toJsObject()
    {
        if ($this->params) {
            $strParams = [];
            foreach ($this->params as $param) {
                $strParams[] = Helper::toJsObject($param);
            }
            $strParams = implode(",", $strParams);
        } else {
            $strParams = '';
        }
        $strFuncName = $this->strFunctionName;
        if ($this->strContext) {
            $strFuncName = $this->strContext . '.' . $strFuncName;
        }
        return $strFuncName . '(' . $strParams . ')';
    }
889134
public function jsonSerialize() {
        $data = new stdClass();
        $vars = get_object_vars($this);

        foreach ($vars as $property => $value) {
            if ($value === null) {
                continue;
            }

            $data->{$property} = $value;
        }

        return $data;
    }
686836
public function getJSONString()
	{
		$json = '{'
				. '"@context":"' .			SocialRecord::JSONLD_CONTEXT . '",'
				. '"@type":"' .				SocialRecord::JSONLD_TYPE . '",'
				. '"type":"' .				$this->type . '",'
				. '"globalID":"' .			$this->globalID . '",'
				. '"platformGID":"' .		$this->platformGID . '",'
				. '"displayName":"' .		$this->displayName . '",'
				. '"profileLocation":"' .	$this->profileLocation . '",'
				. '"personalPublicKey":"' .	PublicKey::exportKey($this->personalPublicKey) . '",'
				. '"accountPublicKey":"' .	PublicKey::exportKey($this->accountPublicKey) . '",'
				. '"salt":"' .	 			$this->salt . '",'
				. '"datetime":"' .	 		$this->datetime . '",'
				. '"active":' . 			$this->active . ','
				. '"keyRevocationList":[';
				
		foreach($this->keyRevocationList as $krc)
		{
			$json .= $krc->getJSONString();
			if($krc !== end($this->keyRevocationList)) $json .= ',';
		}
		
		$json .= ']}';
		
		return $json;
	}
1250918
public function jsonSerialize()
    {
        $json = parent::jsonSerialize();
        $json['width'] = $this->getWidth();
        $json['height'] = $this->getHeight();

        return $json;
    }
635809
public function toJSON()
	{
		$json = json_encode( $this->toArray() );
		if ( json_last_error() == JSON_ERROR_NONE )
			return $json;

			XBRL_Log::getInstance()->err( "Failed to generate JSON for types" );

			return false;
	}
1160410
protected function _getJson()
    {
        if ($this->_json) {
            return $this->_json;
        }

        return $this->_json = json_decode($this->_getBody(), true);
    }
68842
public function getPayloadJSON()
    {
        $data = is_string($this->data) ? mb_convert_encoding($this->data, 'UTF-8') : $this->data;
        return json_encode($data);
    }
660760
protected function getJson()
    {
        if ($this->str_request_body_json === null) {
            $this->str_request_body_json = json_decode($this->getBody());
        }
        return $this->str_request_body_json;
    }
1266940
public function getJSONObject()
    {
        $o = parent::getBaseJSONObject();
        foreach ($this->files as $file) {
            $o->files[] = $file->getJSONObject();
        }

        return $o;
    }