Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Question about the Network API in Codea 1.4

edited May 2012 in Questions Posts: 122

Just got a quick question for the guys beta testing 1.4 or TLL.

Will the new HTTP GET API leave the possibility for doing JSON or XML Parsing from some external website?
I know the actual parsing will have to written using existing functions, but I am more curious on how HTML data will be stored within a variable or class.

Thanks ahead

Tagged:

Comments

  • Posts: 2,820

    The answer is yes. In their online documentation that is updated to beta, their example for it is code that reads the XML that the news button at the bottom of the main Codea screen reads. I'm looking forward to it!

  • Posts: 122

    Awesome! Thanks @Zoyt.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    It doesn't parse XML. Though there are lots of libraries for Lua that will do JSON and XML parsing that you can use (we will probably integrate a JSON library in the future).

  • BortelsBortels Mod
    Posts: 1,557

    You get back a big old string - it's up to you to parse it.

    I've used a json library (dkjson - you can google it) and it's worked well.

  • Posts: 122

    @Simeon & @Bortels: Yeah, I knew a parsing function would have to be written, I was more concerned as the way the data was brought and would it lend itself to be parsed, not do the parsing.

    Thanks!

Sign In or Register to comment.