FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Dec 29, 2011, 6:33 AM
150 Posts

Re: REST Service

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: rest service,JSON
  • Replies: 5
 
You can use java to get the json as a string and then try and convert it to an object or array/vector to use in your repeat.
Below code will return any webpage into a string, put it in a computedValue and try it out. 
 
var u:java.net.URL  = new java.net.URL("http://localhost/mydb.nsf/start.xsp/myjson");
var br:BufferedReader= new java.io.BufferedReader(new java.io.InputStreamReader(u.openStream()));
var tmp="";
while(br.readLine() != null){
    tmp+= br.readLine();
}
tmp 
 
 
Good Luck
Thomas Adrian 
http://www.intrapages.com 
 
 
 

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.