Posted to tcl by dbohdan at Sun Aug 18 20:23:56 GMT 2019view raw

  1. package require http
  2. source json.tcl ;# From jimhttp.
  3.  
  4. http::config -accept application/json
  5. set token [http::geturl http://musicbrainz.org/ws/2/release/817bfcee-a4ee-4afb-9314-9ae0e2885f57?inc=place-rels+release-groups]
  6. set query [json::parse [http::data $token]]
  7.  
  8. puts "title is [dict get $query title]"
  9.  
  10. puts [dict get $query relations 0]

Comments

Posted by davygrvy at Sun Aug 18 21:32:10 GMT 2019 [text] [code]

nice, thanks

Posted by davygrvy at Sun Aug 18 21:48:55 GMT 2019 [text] [code]

https://github.com/dbohdan/jimhttp/blob/master/json.tcl