Skip to main content

Shredding JSON Data

  • Chapter
  • First Online:
  • 1321 Accesses

Abstract

In Chapter 7, I discussed how we can convert relational data into JSON documents, but what if we had to shred a JSON document (just as you learned to shred XML documents in Chapter 4) into a relational dataset? We could achieve this by using the OPENJSON() function. The OPENJSON() function accepts a single JSON document as an input parameter and outputs a tabular result set. The OPENJSON() function can be called either with or without specifying an explicit schema for the result set. OPENJSON() also supports the use of JSON path expressions. This chapter will examine each of these options.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Peter A. Carter

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Carter, P.A. (2018). Shredding JSON Data. In: SQL Server Advanced Data Types. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3901-8_8

Download citation

Publish with us

Policies and ethics