@param string $json

@return self
358200
public static function jsonDeserialize(string $json): self
    {
        $data = array_replace(['path' => null, 'filters' => null, 'force' => false], JSON::decode($json));

        if (!$data['path']) {
            throw new LogicException('The message does not contain "path" but it is required.');
        }

        if (!(null === $data['filters'] || \is_array($data['filters']))) {
            throw new LogicException('The message filters could be either null or array.');
        }

        return new static($data['path'], $data['filters'], $data['force']);
    }
1067285
public function setJson($data)
    {
        if (is_array($data)) {
            $this->_json = $data;
        } elseif (is_string($data)) {
            $this->_json = ['code' => 1, 'message' => $data];
        } elseif (is_int($data)) {
            $this->_json = ['code' => $data, 'message' => $this->getMessage()];
        } else {
            $this->_json = $data;
        }

        return $this;
    }
326961
public static function convertFromJSON($json)
    {
        $object = json_decode($json, true);
        $bencode = self::encode($object);

        return $bencode;
    }
953623
public static function create(array $json)
    {
        $unregisterDeviceResponse = new UnregisterDeviceResponse();
        $unregisterDeviceResponse->setStatusCode($json['status_code']);
        $unregisterDeviceResponse->setStatusMessage($json['status_message']);

        return $unregisterDeviceResponse;
    }
429355
public static function get_Json( &$json )
    {
        if( $json instanceof Json ) {
            return $json;
        }
        return !is_null($json)
            ? new Json($json)
            : null
            ;
    }
913626
public static function unwrapJSON($json): self {
        if (is_string($json)) {
            $json = json_decode($json, true);
        }
        $recipient = new static;
        $recipient->setEndpoint($json['endpoint']);
        $recipient->setIdentifier(array_reverse(explode('/', $json['endpoint']))[0]);
        $recipient->setAuthKey($json['keys'][static::AUTH_KEY]);
        $recipient->setAuthSecret($json['keys'][static::AUTH_SECRET]);
        return $recipient;
    }
225351
static function fromJson(object $map): self {
    return new static(
      isset($map->functionName) && is_string($map->functionName) ? $map->functionName : '',
      isset($map->lineNumber) && is_int($map->lineNumber) ? $map->lineNumber : 0,
      isset($map->executionCount) && is_int($map->executionCount) ? $map->executionCount : 0
    );
  }
1178951
protected function jsonDecode($json)
    {
        $content = json_decode((string) $json, true);
        $this->handleJsonError(json_last_error());
        
        return $content;
    }
1132630
protected function parse_json( $json ) {

		$data = json_decode( $json, true );

		if ( ! is_array( $data ) ) {
			$data = array();
		}

		return $data;
	}
159736
public static function fromArray(array $json)
    {
        $request=new MRPCJsonRequest();
        
        $request->setId($json["id"]);
        $request->setId($json["method"]);
        $request->setId($json["params"]);
        
        return $request;
    }
816173
public static function fromJson($json)
    {
        $object = json_decode($json);

        $sale = new Sale();
        $sale->populate($object);

        return $sale;
    }
1285355
public function fromJSON(string $json):ByteArray{
		$json = \trim($json);

		if(!$this->isAllowedJSON($json)){
			throw new TraitException('invalid JSON array');
		}

		return $this->fromArray(\json_decode(\trim($json)));
	}
354148
public function setAuthConfig($json)
    {
        $data = json_decode($json);
        $this->setClientId($data->client_id);
        $this->setClientSecret($data->client_secret);
    }
623138
public static function groupResponse($json)
    {
        $fields = Deserialize::_fromJson($json);
        return Deserialize::_groupResponseFromFields($json, $fields);
    }
884986
private function parseJson($json)
    {
        $jsonPayload = json_decode($json, true);

        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new ParserException('Error parsing JSON: '
                . json_last_error_msg());
        }

        return $jsonPayload;
    }
1323157
public function json($content)
    {
        $this->header('Content-Type', 'application/json');
        $this->json = true;
        $this->content = $content;

        return $this;
    }
1336845
public static function jsonDeserialize( $json ) {
		return new self(
			$json['id'],
			$json['type'],
			$json['action'],
			$json['timestamp'],
			$json['user'],
			PageIdentifier::jsonDeserialize( $json['pageidentifier'] ),
			$json['comment'],
			$json['details']
		);
	}