Forum OpenACS Development: Re: JSON Array & objects

Collapse
10: Re: JSON Array & objects (response to 9)
Posted by Iuri Sampaio on
Steve,

It turns out that tDOM 0.9 also depends on TCL 8.6. Thus, I solved the problem, amending install-ns.sh script to install tdom 0.9, tcl 8.6, and of course NS 4.99.16.

Furthermore, upgrading TCL to 8.6 was an old task that I had postponed from a while ago, because of an issue that not only myself but also Michael Aram had. He's posted here in OACS Forum, regarding [ns_return 200 text/plain ${v}v]

i.e. "Ain’t No ☀shine", https://openacs.org/forums/message-view?message_id=5379887

@Gustaf, rl_json is just beautiful! Thanks for the tip Gustaf!

Best wishes

Collapse
11: Re: JSON Array & objects (response to 10)
Posted by Steve Manning on
I suppose I'm only delaying the inevitable :o)

Yes, rl_json is cool. I especially like the templating, the power of which I didn't appreciate until I started to use it.

Steve

Collapse
12: Re: JSON Array & objects (response to 10)
Posted by Iuri Sampaio on
Gustaf,

As you're the author of most of install-ns.sh script, If you allow me, I can share it on my Github repository.

I also made a few more tweaks to install systemctl on Debian 8 and Ubuntu 14.04(lts)

Best wishes,

Collapse
13: Re: JSON Array & objects (response to 12)
Posted by Gustaf Neumann on
iuri, since a few months, install-ns installs per default Tcl 8.6.8. Can it be that you have downloaded the script a while ago without updating it later?
Collapse
14: Re: JSON Array & objects (response to 13)
Posted by Gustaf Neumann on
tdom 0.9.0 works at least with Tcl 8.5.19 (I've just compiled it iin this combination), i would expect it to be as well compatible with Tcl 8.4 and 8.3.

Although we had recently problems on one site with tdom 0.9, it turned out finally that the same problems were already in tdom 0.8.3. I think, tdom 0.9.0 can be recommended in general. The updated version of install-ns.sh contains by default support for 0.9.0.

Concerning Tcl 8.6: since Tcl 8.6.7 there are no known issues in connection with OpenACS.

Collapse
16: Re: JSON Array & objects (response to 14)
Posted by Iuri Sampaio on
Since I've use tDOM only on XML-RPC, I've decided to try and learn rl_json.

Best wishes,

Collapse
17: Re: JSON Array & objects (response to 16)
Posted by Gustaf Neumann on
OpenACS uses tdom for many tasks via the xml_* interface. Examples are .xql and .info fiiles.
Collapse
18: Re: JSON Array & objects (response to 17)
Posted by Iuri Sampaio on
Yes, I've noticed that!

In fact, that's why I'd rather use it.

JSON's format has become more and more popular, as for website and webservice's integration.
I realized we have very few ad_procs related to JSON. Unfortunately, differently from XML-RPC, JSON is very much encoding dependent, which makes it hard to maintain, even harder to build API standard procs, for community-wide contribution.

Best wishes,

Collapse
15: Re: JSON Array & objects (response to 13)
Posted by Iuri Sampaio on
Yes, it could be.