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