Javascript Implementation

617 views
Skip to first unread message

Neville Franks

unread,
Oct 11, 2012, 6:49:52 PM10/11/12
to jso...@googlegroups.com
Are there any plans to implement JSONiq in Javascript, so that it could be used in the Browser and Node.js? Maybe this is beyond the scope of the project. And what about a add-on/plug-in for Node.js?

Unless I'm missing something the current C++ implementation somewhat restricts the use of JSOiq.

-Neville

William Candillon

unread,
Oct 14, 2012, 5:18:50 AM10/14/12
to jso...@googlegroups.com
Hello,

Currently no implementation of JSONiq is available in the browser.
This might happen in the near futur: there is already an
implementation of XQuery available in the browser (http://xqib.org)
and Zorba is currently working JIT compiling with LLVM.

Currently Zorba and Node.js can talk to each other via processes or
HTTP (using the http://28.io app server). There are a lot of language
bindings available in Zorba which makes me think that it shouldn't be
too hard to make a Zorba binding for node.js.

Kind regards,

William

Thom Bradford

unread,
Mar 20, 2013, 12:56:47 PM3/20/13
to jso...@googlegroups.com
Hi Neville,

I will be working on such an implementation, although it will only be a subset of the JSONiq grammar that makes sense for in-browser work and I will be adding a bit of 'special sauce' to it based on my objeq library (http://objeq.org), specifically dynamic queries -- the 'tentative' home for this project will be at http://github.com/kode4food/junqi

Cheers!
Thom

Rodolfo Ochoa

unread,
Mar 21, 2013, 1:33:04 PM3/21/13
to jso...@googlegroups.com
Hello,
I just created a basic module for node.js so you can use it with Zorba and therefore to use JSONiq,
to install it, make sure you have Zorba properly installed on your system, the use npm like:
npm install zorba
this will enable you the Zorba module within node.js, currently we have only a simple binding, like in this example:

var zorba = require('zorba');
try {
  var r = zorba.execute("Hello from Zorba for Node");
  console.log(r);
} catch (e) {
  console.log("error");
}

soon I will post references in our site, 
give it a try, 
if you have problems or suggestions, please! please let us know!

-Rodolfo

Andrey Stegno

unread,
Sep 26, 2013, 4:55:07 AM9/26/13
to jso...@googlegroups.com
Why it installation requires python?
Reply all
Reply to author
Forward
0 new messages