શું તમે જાણો છો બોટ કાવ્ય પણ પૂરી પાડે છે મફત હોસ્ટ લાઈવ ચેટ માટે તમારી પોતાની વેબસાઇટ અથવા મોબાઇલ એપ્લિકેશન?
Bot Libre Forum : Connect your Bot to the World - XML, JSON, Web Services, HTML Scraping, Twitter, Facebook, Telegram, Email

RE: Connect your Bot to the World - XML, JSON, Web Services, HTML Scraping, Twitter, Facebook, Telegram, Email

દ્વારા admin પોસ્ટ Jun 29 2016, 14:57

The requestXML() function takes two parameters, but the requestJSON() only takes one currently (this will soon be fixed to allow a second attribute argument).

Http.requestXML(url, xpath)

Http.requestJSON(url)

The JSON API returns an object converted from the JSON. You can use "." to traverse it.

i.e.

var result = Http.requestJSON("http://api.geonames.org/postalCodeSearchJSON?maxRows=1&username=botlibre&postalcode=92590"); result = result.postalCodes.get(#element, 0).placeName;


The get() can be used to get an element from a JSON array.


ને: 13032886
પોસ્ટ: Jun 29 2016, 14:57
સુધારાશે: Jun 29 2016, 21:45
જવાબો: 0
જોવાઈ: 8305, આજે: 4, સપ્તાહ: 5, મહિને: 25
0 0 0.0/5