In my previous publication, we have explored how you can transfer data from JSON to SQL Server 2016. Now, I am going to describe how you can generate JSON from relational data. You can do this using the FOR JSON statement.
JSON is one of the most widely used data interchange formats. It is used as a storing format in several NoSQL solutions, in particular, in Microsoft Azure DocumentDB. In my opinion, today JSON is yet more popular than XML. One of the reasons of its popularity is more simple form and better readability in comparison with XML. Naturally, there was a long-standing need in having an option to process data in this format within SQL Server. In SQL Server 2016, this option has been established. Read More