{"id":15002849,"url":"https://github.com/madeiradata/sqlclrjsonparser","last_synced_at":"2025-10-30T09:30:59.248Z","repository":{"id":72814848,"uuid":"157704078","full_name":"MadeiraData/SqlClrJsonParser","owner":"MadeiraData","description":"A SQL CLR wrapper for parsing Json in SQL Server versions pre-2016","archived":false,"fork":false,"pushed_at":"2019-05-31T14:37:54.000Z","size":446,"stargazers_count":8,"open_issues_count":4,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-02T07:41:23.064Z","etag":null,"topics":["clr","json","json-parse","json-parser","mssql","mssqlserver","sql-clr","sql-server","sqlclr","sqlserver2008","sqlserver2008r2","sqlserver2012","sqlserver2014","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MadeiraData.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-15T12:00:15.000Z","updated_at":"2024-01-31T07:24:55.000Z","dependencies_parsed_at":"2023-02-23T12:31:12.870Z","dependency_job_id":null,"html_url":"https://github.com/MadeiraData/SqlClrJsonParser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FSqlClrJsonParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FSqlClrJsonParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FSqlClrJsonParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FSqlClrJsonParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MadeiraData","download_url":"https://codeload.github.com/MadeiraData/SqlClrJsonParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238950485,"owners_count":19557533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clr","json","json-parse","json-parser","mssql","mssqlserver","sql-clr","sql-server","sqlclr","sqlserver2008","sqlserver2008r2","sqlserver2012","sqlserver2014","wrapper"],"created_at":"2024-09-24T18:53:09.940Z","updated_at":"2025-10-30T09:30:58.847Z","avatar_url":"https://github.com/MadeiraData.png","language":"C#","readme":"# SqlClrJsonParser\n\nA SQL Server CLR wrapper written in C#, for parsing Json documents within SQL Server versions pre-2016 (before the introduction of OPENJSON and JSON_VALUE functions and such).\n\n## Pre-requisites\n\nMost of the pre-requisites are automatically handled by the Pre-Deployment script:\n\n```\nexec sp_configure 'clr enabled', 1\nreconfigure\nGO\nDECLARE @cmd NVARCHAR(MAX)\nSELECT @cmd = N'ALTER AUTHORIZATION ON DATABASE::' + QUOTENAME(DB_NAME()) + N' TO ' + QUOTENAME(sp.name)\nFROM sys.databases AS db\nINNER JOIN sys.server_principals AS sp\nON db.owner_sid = sp.sid\nWHERE db.database_id = 1\nGO\nIF NOT EXISTS (SELECT * FROM sys.assemblies WHERE name = 'System_Runtime_Serialization')\n\tCREATE ASSEMBLY System_Runtime_Serialization FROM 'C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\System.Runtime.Serialization.dll'\n\tWITH PERMISSION_SET = UNSAFE\nGO\nIF NOT EXISTS (SELECT * FROM sys.assemblies WHERE name = 'Newtonsoft.Json')\n\tCREATE ASSEMBLY [Newtonsoft.Json]\n\tFROM '$(PathToNewtonsoftJsonDLL)'\n\tWITH PERMISSION_SET = UNSAFE\nGO\n```\n\nThese requirements are:\n\n- 'clr enabled' instance option must be turned on\n- Target Database must have the same owner as that of the \"master\" database (usually it's \"sa\").\n- Target Database must have the TRUSTWORTHY ON setting (already configured in the project settings).\n- The System.Runtime.Serialization assembly must be imported into the database.\n- The Newtonsoft.Json DLL file must be imported into the database (it's already included with the project, you just need to specify the SQLCMD parameter that defines its file path location).\n\n## Example Usage\n\nHere is an example usage of this assembly within T-SQL:\n\n```\nDECLARE\n\t@Json NVARCHAR(MAX) = '{ \"result\": { \"tickets\": [ { \"id\": \"123\", \"name\": \"hi there\" }, { \"id\": \"456\", \"name\": \"hello there\" } ], \"count\": \"2\" } }'\n\nSELECT *\n, dbo.JsonValue([value], '$.id') AS [id]\n, dbo.JsonValue([value], '$.name') AS [name]\nFROM dbo.JsonTable(@Json, '$.result.tickets')\n\n/* Equivalent of:\nSELECT *\n, JSON_VALUE([value], '$.id') AS [id]\n, JSON_VALUE([value], '$.name') AS [name]\nFROM OPENJSON (@Json, '$.result.tickets')\n*/\n```\n\n## Missing Features\n\nAs of right now, the following features are still missing:\n\n- Equivalent of JSON_MODIFY\n- Equivalent of JSON_QUERY\n- Equivalent of FOR JSON (i.e. format a query as a JSON document)\n\nPlease see the [GitHub Issues](https://github.com/EitanBlumin/SqlClrJsonParser/issues) page for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeiradata%2Fsqlclrjsonparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadeiradata%2Fsqlclrjsonparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeiradata%2Fsqlclrjsonparser/lists"}