flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.
https://flightaware.github.io/speedtables/
BSD 3-Clause "New" or "Revised" License
66 stars 15 forks source link

Add direct JSON return of search results #28

Open lehenbauer opened 12 years ago

lehenbauer commented 12 years ago

Using yajl or whatever, add a direct JSON return capability. It can be a direct C-to-C thing and since type inspection from C is trivial and fast we can generate the JSON with fidelity. The Tcl interpreter wouldn't even need to be invoked for each match.

Something like... $table search -compare [list [list > clock $val]] -json varName

...to get the json into a var. You might want a -jsonfp or something, to write directly to a file handle or socket.