Google E-Tablolar Üzerinden JSON Formatında Veri Çekme

--

Öncelikle JSON nedir?

JSON esasen javascript için oluşturulmuş ve xml’den daha az yer kaplayabileceği nedeniyle geliştirilmiştir. JavaScript Object Notation’un kısaltmasıdır. Şu anda bir çok platform tarafından desteklenmekte ve xml gibi global bir veri formatıdır.

Aşağıdaki görsel de basit bir JSON örneği görüyorsunuz.

Bu örneği, xml formatında yazmak isteseydik aşağıdaki gibi olacaktı:

Google e-tablolar üzerinde aynı yapıyı oluşturalım.

https://docs.google.com/spreadsheets/d/1uebxYNq-P97nRoEH2QeLPcYltZvwqKeK5pOvZIP0NBs/edit#gid=0

“Dosya > Web’de Yayınla” yolunu izleyerek, dosyamızı heryerden erişilebilir hale getiriyoruz.

Dosyamızın url’inde /d ifadesinden sonra her dosya için özel olarak oluşturulan bir id bulunur.

https://spreadsheets.google.com/feeds/list/SHEET-ID/od6/public/values?alt=json URL’i üzerinde belirtilen SHEET-ID kısmına dosyamızın id’sini yazıyoruz. Bizim için yeni oluşan URL:

https://spreadsheets.google.com/feeds/list/1uebxYNq-P97nRoEH2QeLPcYltZvwqKeK5pOvZIP0NBs/od6/public/values?alt=json

Buradan JSON formatında sheet dosyamıza gerçek zamanlı olarak erişebilirsiniz.

Zaman ayırdığınız için teşekkürler…

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mustafa BİÇER
Mustafa BİÇER

Written by Mustafa BİÇER

Frontend Developer | Trainer | Consultant | Content Creator

No responses yet

Write a response