Languages Features Creators CSV Resources Challenges Add Language
GitHub icon


JSONiq - Query language

< >

JSONiq is a query language created in 2011.

#683on PLDB 12Years Old 251Users
0Books 0Papers 153Repos

JSONiq is a query and functional programming language that is designed to declaratively query and transform collections of hierarchical and heterogeneous data in format of JSON, XML, as well as unstructured, textual data. JSONiq is an open specification published under the Creative Commons Attribution-ShareAlike 3.0 license. It is based on the XQuery language, with which it shares the same core expressions and operations on atomic types. Read more on Wikipedia...

Example from hello-world:
"Hello World"
Example from Linguist:
(: Query for returning one database entry :) import module namespace req = ""; import module namespace catalog = ""; variable $id := (req:param-values("id"), "London")[1]; variable $part := (req:param-values("part"), "main")[1]; catalog:get-data-by-key($id, $part)
Example from Wikipedia:
for $p in collection("persons") return <person> <firstName>{$p("firstName")}</firstName> <lastName>{$p("lastName")}</lastName> <age>{$p("age")}</age> </person>

Language features

Feature Supported Token Example
Strings "
"Hello world"
[1, 2, 3]
{"name": "Mary"}
Case Insensitive Identifiers X
Semantic Indentation X
Multiline Strings X
File Imports X
MultiLine Comments X
Ternary operators X
Conditionals X
Line Comments X
Macros X
Comments X
Disk Output X
karel.html · jsoniq.html · digital-command-language.html

View source

- Build the next great programming language · Search · Day 209 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub ·