Skip to main content Get to know Azure Microsoft as Customer Zero View all products (200+) Microsoft Foundry Azure Copilot GitHub Copilot Azure Kubernetes Service (AKS) Azure Cosmos DB Azure Database for PostgreSQL Azure Arc Microsoft Fabric Linux virtual machines in Azure Foundry Models Foundry Agent Service Foundry IQ Foundry Tools Foundry Control Plane Observability in Foundry Control Plane Azure OpenAI in Foundry Models Azure Speech in Foundry Tools Azure Machine Learning View all databases Azure Cosmos DB Azure DocumentDB Azure SQL Azure Database for PostgreSQL Azure Managed Redis Microsoft Fabric Azure Databricks Linux virtual machines in Azure Windows Server on Azure Azure Functions Azure Virtual Machine Scale Sets Azure API Management Azure Container Apps Azure Kubernetes Service (AKS) Azure Kubernetes Fleet Manager Azure Container Registry Azure Red Hat OpenShift Azure Container Instances Azure Container Storage Azure Arc Azure Local Microsoft Defender for Cloud Azure Monitor Microsoft Sentinel Azure Migrate View all solutions (40+) Cloud solutions for small and medium businesses Cloud migration and modernization center Data analytics for AI Azure Databases AI apps and agents Microsoft Marketplace Microsoft Sovereign Cloud AI apps and agents Responsible AI with Azure AI Infrastructure Data analytics for AI Machine learning operations (MLOps) Low-code application development on Azure Integration Services Serverless computing DevOps Migration and modernization center .NET apps migration Databases on Azure Linux on Azure Oracle on Azure SAP on the Microsoft Cloud Adaptive cloud High-performance computing (HPC) Infrastructure as a service (IaaS) Resiliency Azure Essentials Frontier Accelerate for Azure FinOps on Azure Microsoft Marketplace Azure pricing overview Create an Azure account Free Azure services Flexible purchase options Pricing calculator FinOps on Azure Maximize ROI from AI Azure savings plans Azure reservations Azure Hybrid Benefit Virtual Machines Azure SQL Microsoft Foundry Microsoft Fabric Azure Kubernetes Service (AKS) Microsoft Defender for Cloud View more Software Development Companies Microsoft Marketplace Find a partner Resources for Azure partners Get started with Azure Customer stories Analyst reports, white papers, and e-books Videos Learn more about cloud computing Documentation Explore Azure portal Developer resources Quickstart templates Resources for startups Developer community Students Azure for partners Blog Events and Webinars Learn Support Contact Sales Get started with Azure Sign in

We are happy to announce that public preview period of new JSON functionalities in Azure SQL Database has ended in August 2016. JSON functionalities are now generally available in all service tiers of Azure Sql Database.

With new JSON functionalities, Azure SQL Database enables you to easily integrate your database with other services that communicate using JSON documents, and to handle variety of data that should be stored in your database.

Why JSON?

JSON is popular format used for data exchange between various modern applications and services. It is also used for storing semi-structured data.

JSON can be found everywhere in Azure ecosystem. JSON documents are produced by web and mobile clients (e.g. JavaScript libraries in browsers), sensors, and services that generate logs (e.g. Application Insight). They can be processed using various Azure services such as Azure Stream Analytics, Azure Data Factory, or Azure Machine Learning. Finally, JSON documents can be stored in Azure DocumentDB, Azure Blob or Table Storage, Azure Data Lake, or Azure SQL Database. Azure Search can also index JSON document stored in various data sources.

Azure SQL Database enables you to store JSON in standard textual format, use standard SQL language for querying JSON data, with the same indexing methods as on other standard SQL data types. If you need a specialized JSON database in order to take advantage of automatic indexing of JSON fields, tunable consistency levels for globally distributed data, and JavaScript integration, you may want to choose Azure DocumentDB as a storage engine.

When to consider JSON with Azure SQL Database?

Azure SQL Database provides a hybrid model for storing and querying relational and JSON data. You can use standard relational models to organize your data, add flexibility in your schema using JSON, and use full SQL language for querying both relational and JSON columns.

JSON functionalities in Azure SQL Database can help you in different scenarios.

Easy ingestion of JSON data

If you are working with systems and devices that provide data formatted as JSON (e.g. mobile devices, sensors, Azure Stream Analytics, or Application Insight), you can directly send data to Azure SQL Database without any additional layer that transforms JSON to relational format. Raw JSON documents can be directly sent to Azure SQL Database where they can be stored in original format or converted to the relational model.

Exchange data with other systems or libraries via JSON documents

Web frameworks and libraries such as JQuery, D3, AngularJS, or ReactJS, that read server data via AJAX calls; REST web services that provide data in JSON format, and components that show data formatted as GeoJSON may directly use data from Azure SQL Database formatted as JSON. Without need for additional components to transform data from Azure SQL Database into JSON format, you can easily format data stored in Azure SQL Database as JSON documents that can be directly used in these libraries and services.

Handling data variety with flexible data models

Do you need to add semi-structured data in your relational models? If you have data models with a large number of different properties that might frequently change, such as catalogs with different product types, questionnaires and survey results with various questions, sensor data with information that depend on sensor type and purpose, you might need some flexibility to store variable parts of data. These data models require relationships between entities, but also flexibility for easily adding and changing fields and data structures. By combining relational models and JSON fields, you can easily design the best model for these use cases and query both relational and JSON columns.

What is it available?

Azure SQL Database works with JSON documents in standard well-known textual format. There is no need to convert your JSON documents to some custom binary serialization format or type, or to reload or transform your JSON data. Overview of JSON functionalities available in Azure SQL Database is shown on the following figure:

JSON-overview

Azure SQL Database provides simple built-in functions that enable you to extract value from JSON text and use it in queries (JSON_VALUE), extract objects from JSON (JSON_QUERY), update some value in JSON text (JSON_MODIFY) and verify that JSON text is properly formatted (ISJSON). These four, simple, easy to learn functions can be used in any SQL query.

Without need to learn new JSON query language you can query both JSON and relational columns in the same queries using well-known standard SQL language and new built-in JSON functions. Applications and tools would not see any difference between values taken from table columns and the values extracted from JSON text. New OPENJSON function enables you to convert JSON text into table structure.

Transformed JSON can be queried using standard SQL language or loaded into relational tables. Finally, JSON functionalities enable you to easily format database content and results of SQL queries as JSON text using FOR JSON clause. Formatted JSON can be used in any application or service that understands JSON.

Next steps

To learn how to integrate JSON in your application, check out TechNet Blog, MSDN documentation or Channel 9 video. To learn about various scenarios that show how to integrate JSON in your application, see demos in this Channel 9 video or find some scenario that might be interesting for your use case in JSON Blog posts.

Try out JSON functions today – we are eager to hear your feedback!

WE ARE MICROSOFT

Explore Microsoft Foundry

The future of AI starts here. Envision your next great AI app with the latest technologies. Get started with Azure.