public static function dataToJson(string $data, bool $lint = false): stdClass
    {
        if ($lint) {
            $linter = new JsonParser();
            $linter->parse($data);
        }

        $data = json_decode($data);
        if ($data === null) {
            throw new InvalidArgumentException("Failed to decode json");
        }

        return (object)$data;
    }