{"id":35317,"date":"2024-10-18T14:47:21","date_gmt":"2024-10-18T12:47:21","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=35317"},"modified":"2024-10-18T15:15:52","modified_gmt":"2024-10-18T13:15:52","slug":"postgresql-17-enhancing-json-support-for-web-developers","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/","title":{"rendered":"PostgreSQL 17: Enhancing JSON Support for Web Developers"},"content":{"rendered":"\n<p>PostgreSQL 17 introduces new features for working with JSON data. These features align PostgreSQL more closely with the SQL\/JSON standard and improve the developer experience when dealing with semi-structured data. In this blog, we will explore the new JSON capabilities by walking through real-world examples using a table with a <code>jsonb<\/code> column.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-json-data-challenge-for-web-developers\"><strong>The JSON Data Challenge for Web Developers<\/strong><\/h4>\n\n\n\n<p>When building modern web applications, it\u2019s common to handle JSON data\u2014whether it&#8217;s from API responses, user data, or configuration files. PostgreSQL has supported JSON for years, and with the release of PostgreSQL 17, working with JSON becomes even more streamlined.<br>Let\u2019s start by creating a table to store user data in a <code>jsonb<\/code> column and use it to demonstrate the new features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-i-creating-a-table-with-a-jsonb-column\">I. Creating a Table with a <code>jsonb<\/code> Column<\/h2>\n\n\n\n<p>To demonstrate PostgreSQL 17\u2019s new features, let\u2019s create a simple table called <code>users<\/code> that stores user information in a <code>jsonb<\/code> column.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# CREATE TABLE users (\n    id SERIAL PRIMARY KEY,\n    name TEXT NOT NULL,\n    profile JSONB\n);\nCREATE TABLE\n<\/pre><\/div>\n\n\n<p>This table has three columns:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>id<\/code>: A unique identifier for each user.<\/li>\n\n\n\n<li><code>name<\/code>: The user&#8217;s name.<\/li>\n\n\n\n<li><code>profile<\/code>: A <code>jsonb<\/code> column that stores various information about the user, such as their age, preferences, and settings.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-inserting-data\"><strong>Inserting Data<\/strong><\/h4>\n\n\n\n<p>Now, we\u2019ll insert some user data in JSON format into the <code>profile<\/code> column.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# INSERT INTO users (name, profile)\nVALUES\n(&#039;John Doe&#039;, &#039;{&quot;age&quot;: 30, &quot;preferences&quot;: {&quot;newsletter&quot;: true, &quot;theme&quot;: &quot;dark&quot;}}&#039;),\n(&#039;Jane Smith&#039;, &#039;{&quot;age&quot;: 25, &quot;preferences&quot;: {&quot;newsletter&quot;: false, &quot;theme&quot;: &quot;light&quot;}}&#039;),\n(&#039;Alice Brown&#039;, &#039;{&quot;age&quot;: 35, &quot;preferences&quot;: {&quot;newsletter&quot;: true, &quot;theme&quot;: &quot;dark&quot;}, &quot;address&quot;:                        {&quot;city&quot;: &quot;Paris&quot;, &quot;country&quot;: &quot;France&quot;}}&#039;);\nINSERT 0 3\n<\/pre><\/div>\n\n\n<p>We now have three users with different JSON profiles, each containing details such as age, preferences for newsletters and themes, and, in Alice\u2019s case, an address.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# select * from users;\n id |    name     |                                                       profile\n----+-------------+----------------------------------------------------------------------------------------------------------------------\n  1 | John Doe    | {&quot;age&quot;: 30, &quot;preferences&quot;: {&quot;theme&quot;: &quot;dark&quot;, &quot;newsletter&quot;: true}}\n  2 | Jane Smith  | {&quot;age&quot;: 25, &quot;preferences&quot;: {&quot;theme&quot;: &quot;light&quot;, &quot;newsletter&quot;: false}}\n  3 | Alice Brown | {&quot;age&quot;: 35, &quot;address&quot;: {&quot;city&quot;: &quot;Paris&quot;, &quot;country&quot;: &quot;France&quot;}, &quot;preferences&quot;: {&quot;theme&quot;: &quot;dark&quot;, &quot;newsletter&quot;: true}}\n(3 rows)\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ii-using-postgresql-17-s-new-json-features\">II. Using PostgreSQL 17\u2019s New JSON Features<\/h2>\n\n\n\n<p>With the table set up and populated, let\u2019s explore the new JSON-related features in PostgreSQL 17, such as <code>JSON_TABLE<\/code>, SQL\/JSON query functions, and enhanced <code>jsonpath<\/code> expressions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-a-json-table-converting-json-into-tabular-format\">a. <code>JSON_TABLE<\/code>: Converting JSON into Tabular Format<\/h3>\n\n\n\n<p>The <code>JSON_TABLE<\/code> function allows us to transform our <code>jsonb<\/code> data into rows and columns. This is particularly useful when we want to extract structured data from JSON documents stored in a relational database.<\/p>\n\n\n\n<p>Let\u2019s extract the <code>age<\/code> and <code>theme<\/code> from the <code>profile<\/code> column and convert it into a tabular format:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npostgres=# SELECT *\nFROM JSON_TABLE(\n    (SELECT profile FROM users WHERE name = &#039;Alice Brown&#039;),\n    &#039;$.preferences&#039; COLUMNS (theme TEXT PATH &#039;$.theme&#039;, newsletter BOOLEAN PATH &#039;$.newsletter&#039;)\n) AS jt;\n theme | newsletter\n-------+------------\n dark  | t\n(1 row)\n<\/pre><\/div>\n\n\n<p>Here, we extracted Alice Brown&#8217;s theme preference and whether she subscribes to the newsletter from her <code>profile<\/code>. The <strong><code>$<\/code><\/strong> symbol is essential for this operation.<\/p>\n\n\n\n<p>Here&#8217;s a breakdown of how this works:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>$.preferences<\/code><\/strong>: This part refers to the <code>preferences<\/code> key at the root of the JSON document. Once this key is selected, it acts as the root for the columns inside the <code>preferences<\/code> object.<\/li>\n\n\n\n<li><strong>Inside the <code>COLUMNS<\/code> clause<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong><code>$.theme<\/code><\/strong>: Here, <strong><code>$<\/code><\/strong> refers to the root of the <strong><code>preferences<\/code><\/strong> object, not the root of the entire JSON document. So, it looks for the <code>theme<\/code> key inside the <code>preferences<\/code> object.<\/li>\n\n\n\n<li><strong><code>$.newsletter<\/code><\/strong>: Similarly, <strong><code>$<\/code><\/strong> here refers to the root of the <strong><code>preferences<\/code><\/strong> object, and it looks for the <code>newsletter<\/code> key within that object.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>In this context, the <strong><code>$<\/code><\/strong> in the <code>COLUMNS<\/code> clause is &#8220;relative&#8221; to the object you are working with, which in this case is <code>preferences<\/code>. This is a key concept in using the <code>JSON_TABLE<\/code> function and <code>jsonpath<\/code> expressions in PostgreSQL\u2014<strong><code>$<\/code><\/strong> adapts based on the context of the object you&#8217;re working with at that stage of the query.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-b-jsonb-build-object-creating-json-data-in-queries\">b. jsonb_build_object: Creating JSON Data in Queries<\/h3>\n\n\n\n<p>PostgreSQL allows you to create JSON directly from SQL expressions, making it easier to work with JSON data dynamically. This function exists since PostgreSQL 12, but I believe that it makes sense to present it here.<\/p>\n\n\n\n<p>Let\u2019s construct some JSON data based on our <code>users<\/code> table:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# SELECT name,\n       jsonb_build_object(\n           &#039;age&#039;, profile-&gt;&gt;&#039;age&#039;,\n           &#039;theme&#039;, profile-&gt;&#039;preferences&#039;-&gt;&gt;&#039;theme&#039;\n       ) AS constructed_json\nFROM users;\n    name     |        constructed_json\n-------------+---------------------------------\n John Doe    | {&quot;age&quot;: &quot;30&quot;, &quot;theme&quot;: &quot;dark&quot;}\n Jane Smith  | {&quot;age&quot;: &quot;25&quot;, &quot;theme&quot;: &quot;light&quot;}\n Alice Brown | {&quot;age&quot;: &quot;35&quot;, &quot;theme&quot;: &quot;dark&quot;}\n(3 rows)\n<\/pre><\/div>\n\n\n<p>This query dynamically builds a JSON object from the <code>age<\/code> and <code>theme<\/code> fields in the <code>profile<\/code> column.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-c-sql-json-query-functions-simplifying-json-queries\">c. SQL\/JSON Query Functions: Simplifying JSON Queries<\/h3>\n\n\n\n<p>PostgreSQL 17 introduces several new SQL\/JSON query functions, such as <code>JSON_EXISTS<\/code>, <code>JSON_QUERY<\/code>, and <code>JSON_VALUE<\/code>. These functions allow you to query and extract values from JSON documents more efficiently.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Example: Checking for the Existence of a Key<\/strong><\/h4>\n\n\n\n<p>Let\u2019s check if the <code>address<\/code> key exists in John Doe&#8217;s profile:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# SELECT JSON_EXISTS(profile, &#039;$.address&#039;)\nFROM users\nWHERE name = &#039;John Doe&#039;;\n json_exists\n-------------\n f\n(1 row)\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-example-extracting-scalar-values\"><strong>Example: Extracting Scalar Values<\/strong><\/h4>\n\n\n\n<p>We can use the <code>JSON_VALUE<\/code> function to extract specific values from a JSON document. For example, let\u2019s extract the <code>city<\/code> from Alice\u2019s address:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# SELECT JSON_VALUE(profile, &#039;$.address.city&#039;)\nFROM users\nWHERE name = &#039;Alice Brown&#039;;\n json_value\n------------\n Paris\n(1 row)\n<\/pre><\/div>\n\n\n<p>The <code>JSON_VALUE<\/code> function simplifies the process of extracting individual scalar values from JSON documents. Use <code>JSON_VALUE()<\/code> only when you expect the extracted value to be a single SQL\/JSON scalar. Attempting to retrieve multiple values will result in an error. If the extracted value might be an object or an array, opt for the <code>JSON_QUERY<\/code> function instead.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-example-extract-specific-values-from-a-json-document\"><strong>Example: extract specific values from a JSON document<\/strong><\/h4>\n\n\n\n<p>The <code>JSON_QUERY<\/code> function in PostgreSQL provides a powerful way to extract data from JSONB columns using path expressions. By leveraging its various options, developers can customize the output format, handle errors gracefully, and work efficiently with JSON data stored in PostgreSQL. Now, let&#8217;s use <code>JSON_QUERY<\/code> to extract the preferences for each user. We want to get the <code>preferences<\/code> object for each user&#8217;s profile.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# SELECT\n    name,\n    JSON_QUERY(profile, &#039;$.preferences&#039;) AS user_preferences\nFROM users;\n    name     |            user_preferences\n-------------+-----------------------------------------\n John Doe    | {&quot;theme&quot;: &quot;dark&quot;, &quot;newsletter&quot;: true}\n Jane Smith  | {&quot;theme&quot;: &quot;light&quot;, &quot;newsletter&quot;: false}\n Alice Brown | {&quot;theme&quot;: &quot;dark&quot;, &quot;newsletter&quot;: true}\n(3 rows)\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-d-enhanced-jsonpath-expressions\">d. Enhanced <code>jsonpath<\/code> Expressions<\/h3>\n\n\n\n<p>PostgreSQL improves its support for <code>jsonpath<\/code> expressions, enabling more advanced queries. You can now cast JSON values into native PostgreSQL types, such as integers or booleans.<\/p>\n\n\n\n<p>Let\u2019s extract Jane Smith\u2019s <code>age<\/code> and cast it as an integer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# SELECT JSON_VALUE(profile, &#039;$.age&#039; RETURNING INT) AS age_int\nFROM users\nWHERE name = &#039;Jane Smith&#039;;\n age_int\n---------\n      25\n(1 row)\n<\/pre><\/div>\n\n\n<p>This query demonstrates how you can convert JSON data into a native PostgreSQL type using the <code>RETURNING<\/code> clause.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>PostgreSQL 17 brings powerful new features for working with JSON data, making it easier for web developers to query and manipulate JSON in a database. We explored how <code>JSON_TABLE<\/code>, new SQL\/JSON functions, and enhanced <code>jsonpath<\/code> expressions help convert JSON data into a more usable format, extract values, and even handle complex queries.<\/p>\n\n\n\n<p>These new tools make working with semi-structured data simpler, allowing you to build more efficient and flexible web applications. If you often work with JSON in PostgreSQL, upgrading to version 17 will streamline your workflow and enhance your capabilities.<\/p>\n\n\n\n<p>Stay tuned and don&#8217;t forget to check PostgreSQL 17 Release note <a href=\"https:\/\/www.postgresql.org\/about\/news\/postgresql-17-released-2936\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.postgresql.org\/about\/news\/postgresql-17-released-2936\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL 17 introduces new features for working with JSON data. These features align PostgreSQL more closely with the SQL\/JSON standard and improve the developer experience when dealing with semi-structured data. In this blog, we will explore the new JSON capabilities by walking through real-world examples using a table with a jsonb column. The JSON Data [&hellip;]<\/p>\n","protected":false},"author":87,"featured_media":35330,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[368,83],"tags":[694,77],"type_dbi":[2749],"class_list":["post-35317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development-performance","category-postgresql","tag-json","tag-postgresql","type-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL 17: Enhancing JSON Support for Web Developers - dbi Blog<\/title>\n<meta name=\"description\" content=\"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL 17: Enhancing JSON Support for Web Developers\" \/>\n<meta property=\"og:description\" content=\"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-18T12:47:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-18T13:15:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Joan Frey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joan Frey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\"},\"author\":{\"name\":\"Joan Frey\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06\"},\"headline\":\"PostgreSQL 17: Enhancing JSON Support for Web Developers\",\"datePublished\":\"2024-10-18T12:47:21+00:00\",\"dateModified\":\"2024-10-18T13:15:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\"},\"wordCount\":909,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp\",\"keywords\":[\"json\",\"PostgreSQL\"],\"articleSection\":[\"Development &amp; Performance\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\",\"name\":\"PostgreSQL 17: Enhancing JSON Support for Web Developers - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp\",\"datePublished\":\"2024-10-18T12:47:21+00:00\",\"dateModified\":\"2024-10-18T13:15:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06\"},\"description\":\"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp\",\"width\":1024,\"height\":1024,\"caption\":\"postgresql_json\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL 17: Enhancing JSON Support for Web Developers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06\",\"name\":\"Joan Frey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g\",\"caption\":\"Joan Frey\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/joanfrey\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL 17: Enhancing JSON Support for Web Developers - dbi Blog","description":"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL 17: Enhancing JSON Support for Web Developers","og_description":"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/","og_site_name":"dbi Blog","article_published_time":"2024-10-18T12:47:21+00:00","article_modified_time":"2024-10-18T13:15:52+00:00","og_image":[{"width":1024,"height":1024,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp","type":"image\/webp"}],"author":"Joan Frey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Joan Frey","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/"},"author":{"name":"Joan Frey","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06"},"headline":"PostgreSQL 17: Enhancing JSON Support for Web Developers","datePublished":"2024-10-18T12:47:21+00:00","dateModified":"2024-10-18T13:15:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/"},"wordCount":909,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp","keywords":["json","PostgreSQL"],"articleSection":["Development &amp; Performance","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/","name":"PostgreSQL 17: Enhancing JSON Support for Web Developers - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp","datePublished":"2024-10-18T12:47:21+00:00","dateModified":"2024-10-18T13:15:52+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06"},"description":"Explore PostgreSQL 17\u2019s enhanced JSON support for web developers. Learn how new features like JSON_TABLE, SQL\/JSON functions, and improved jsonpath expressions simplify working with semi-structured data in your web applications.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/10\/DALL\u00b7E-2024-10-18-14.42.28-A-detailed-illustration-of-an-elephant-standing-in-a-natural-setting-with-the-word-JSON-in-large-bold-block-letters-behind-it.-The-elephant-has-a.webp","width":1024,"height":1024,"caption":"postgresql_json"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-17-enhancing-json-support-for-web-developers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL 17: Enhancing JSON Support for Web Developers"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/c03c47649664fe73b27ce457e99f5b06","name":"Joan Frey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1e650cf665b4d44dd186355827c0b049d2f95c8cbb45fd10d4e7cb255be67ecb?s=96&d=mm&r=g","caption":"Joan Frey"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/joanfrey\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/35317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=35317"}],"version-history":[{"count":11,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/35317\/revisions"}],"predecessor-version":[{"id":35336,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/35317\/revisions\/35336"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/35330"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=35317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=35317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=35317"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=35317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}