googleapi – python3
import urllib.request, json with urllib.request.urlopen("http://maps.googleapis.com/maps/api/geocode/json?address=google") as url: data = json.loads(url.read().decode()) print(data)
flatpress – php
1 {assign var="post_link" value=$id|link:post_link } 2 {assign var="cat" value=$categories|@filed } 3 4 {php} 5 //header("Content-type: text/plain charset=utf-8"); 6 header("Content-Type: application/json; charset=UTF-8"); 7 echo json_encode( $this->get_template_vars() ); 8 {/php}