public function getJsonProperty(string $name, $filter = 'string')
    {
        // manually filter since we are not going through getPost/Put
        $filterService = new Filter();

        $json = $this->getJsonRawBody();
        if (is_object($json)) {
            if (isset($json->$name)) {
                return $filterService->sanitize($json->$name, $filter);
            } else {
                // found valid json, but no matching property found
                return null;
            }
        } else {
            // expected name not found
            throw new HTTPException('Could not find expected json data.', 500, [
                'dev' => json_encode($json),
                'code' => '894984616161681468764'
            ]);
        }
    }