Parse JSON in TSQL

json, sql-server, t-sql

Solution

Update: As of SQL Server 2016 parsing JSON in TSQL is now possible.

Natively, there is no support. You'll have to use CLR. It is as simple as that, unless you have a huge masochistic streak and want to write a JSON parser in SQL

Normally, folk ask for JSON output from the DB and there are examples on the internet. But into a DB?

Problem

Is it possible to parse `JSON` in `TSQL`? I don't mean to create a `JSON` string; rather, I want to parse a `JSON` string passed in as a `parameter`.

Original source