﻿
{"id":5387,"date":"2016-12-01T06:21:45","date_gmt":"2016-12-01T06:21:45","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=5387"},"modified":"2016-12-01T06:21:45","modified_gmt":"2016-12-01T06:21:45","slug":"sql-server-2016-json_value-fonksiyonu","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/sql-server-2016-json_value-fonksiyonu\/","title":{"rendered":"SQL Server 2016 &#8211; JSON_VALUE Fonksiyonu"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>SQL Server 2016 versiyonunun \u00f6nemli getirisi olan <a href=\"http:\/\/www.gencayyildiz.com\/blog\/sql-server-2016-native-json\/\" target=\"_blank\">Native JSON<\/a> \u00f6zelli\u011finin JSON i\u015flevsel fonksiyon uzant\u0131lar\u0131ndan bir yenisi daha JSON_VALUE fonksiyonudur. Bu fonksiyon arac\u0131l\u0131\u011f\u0131yla elimizdeki herhangi bir JSON verinin herhangi bir node&#8217;unu belirli bir formatsal kal\u0131pta sorgulayabilmekteyiz.<\/p>\n<p>JSON_VALUE fonksiyonunun prototipini incelersek e\u011fer;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nJSON_VALUE(Expression, Path)\r\n<\/pre>\n<p>g\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere iki parametre almaktad\u0131r. Expression parametresine elimizdeki JSON verisi verilmekte, Path parametresinde ise bu JSON veri \u00fczerinden hangi hususi adresin \u00fczerinde \u00e7al\u0131\u015f\u0131laca\u011f\u0131 belirtilmektedir.<\/p>\n<p>\u015eimdi a\u015fa\u011f\u0131daki \u00f6rnek kod blo\u011funu inceleyiniz.<br \/>\n<div id=\"attachment_5391\" style=\"width: 582px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5391\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu.png\" alt=\"SQL Server 2016 - JSON_VALUE Fonksiyonu\" width=\"572\" height=\"351\" class=\"size-full wp-image-5391\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu.png 572w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu-300x184.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><p id=\"caption-attachment-5391\" class=\"wp-caption-text\">SQL Server 2016 &#8211; JSON_VALUE Fonksiyonu<\/p><\/div><\/p>\n<p>Yukar\u0131daki ekran g\u00f6r\u00fcnt\u00fcs\u00fcnde g\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere kolay bir \u015fekilde elimizdeki JSON verisinin &#8220;Adi&#8221; node&#8217;unda ki de\u011fere ula\u015fabilmi\u015f bulunmaktay\u0131z. Burada dikkatinizi ikinci parametreye \u00e7ekmek istiyorum. Konumuzun ba\u015f\u0131nda da belirtti\u011fim gibi hususi node&#8217;a eri\u015febilmek i\u00e7in bir formatsal kal\u0131pta ilgili alanlar\u0131 belirtmemiz gerekmektedir. Buradaki format\u0131m\u0131z &#8220;<strong><em>$<\/em><\/strong>&#8221; ve &#8220;<strong><em>.<\/em><\/strong>&#8220;(nokta) operat\u00f6rleri arac\u0131l\u0131\u011f\u0131yla \u015fekillenmektedir. &#8220;$&#8221; operat\u00f6r\u00fc ilgili JSON verisinin root eleman\u0131n\u0131 temsil ederken, &#8220;.&#8221; operat\u00f6r\u00fc ise root eleman\u0131ndan sonraki dikey hiyerar\u015fide gitmek istedi\u011fimiz node&#8217;a eri\u015fmemizi sa\u011flamaktad\u0131r.<\/p>\n<p>\u00d6rne\u011fimizde de g\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere &#8220;$.Adi&#8221; ifadesi root eleman\u0131 alt\u0131ndaki Adi node&#8217;unun de\u011ferini bizlere vermektedir.<\/p>\n<p>Son olarak format\u0131 daha derin kavrayabilmek i\u00e7in a\u015fa\u011f\u0131daki \u00f6rne\u011fi incelemenizi tavsiye ederim.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu-1.png\" alt=\"SQL Server 2016 - JSON_VALUE Fonksiyonu\" width=\"551\" height=\"348\" class=\"aligncenter size-full wp-image-5394\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu-1.png 551w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/12\/SQL-Server-2016-JSON_VALUE-Fonksiyonu-1-300x189.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/a><br \/>\nG\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere &#8220;$.Ozellikleri.Meslek&#8221; ifadesi root eleman\u0131 alt\u0131ndaki Ozellikleri node&#8217;u alt\u0131ndaki Meslek node&#8217;unun de\u011ferini ifade etmektedir.<\/p>\n<p>Sonraki yaz\u0131lar\u0131mda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u015eimdilik ho\u015f\u00e7akal\u0131n&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, SQL Server 2016 versiyonunun \u00f6nemli getirisi olan Native JSON \u00f6zelli\u011finin JSON i\u015flevsel fonksiyon uzant\u0131lar\u0131ndan bir yenisi daha JSON_VALUE fonksiyonudur. Bu fonksiyon arac\u0131l\u0131\u011f\u0131yla elimizdeki herhangi bir JSON verinin herhangi bir node&#8217;unu belirli bir formatsal&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":3415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1082,1412],"tags":[1554,1553,1413,1539],"class_list":["post-5387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server","category-sql-server-2016","tag-json_value","tag-json_value-fonksiyonu","tag-sql-server-2016","tag-sql-server-2016-yenilikleri"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/5387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=5387"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/5387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/3415"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=5387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=5387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=5387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}