New release devlooped/JQSharp@v1.0.0 #41
kzu
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎉 Release Notes — jq# (JQSharp)
A full .NET implementation of the jq filter language for querying and transforming JSON.
✅ Full Feature Parity with jq
🔤 Basic Selectors & Composition
.), field access (.foo,.foo.bar), string/index subscripts (.[string],.[number]).[n:n]), iterators (.[],.[]?)|), comma (,), parentheses[expr]) and object ({key: value}) constructors..)💬 Comments
#line comments with\continuation to the next line🔢 Operators
+,-,*,/,%with type-aware behavior for strings, arrays, and objects-expr==,!=,<,>,<=,>=and,or,not//— falls back to right-hand side when left isfalseornull🔀 Conditionals
if-then-elif-else-end❓ Optional Operator
?— suppresses errors on any expression📦 Literals
null,true,false, numbers, strings (with escape sequences)🏗️ Builtin Functions
Zero-Argument Builtins
emptytype,length,utf8bytelength,infinite,nan,isinfinite,isnan,isfinite,isnormalarrays,objects,iterables,booleans,numbers,normals,finites,strings,nulls,values,scalarskeys,keys_unsorted,reverse,sort,unique,flatten,add,any,all,min,max,to_entries,from_entries,paths,transpose,combinationstonumber,tostring,toboolean,tojson,fromjson,explode,implode,ascii_downcase,ascii_upcaseabs,floor,sqrttrim,ltrim,rtrimrecurse,halt,env,builtins,first,last🔍 Type/Value Testing & Selection
has(key),in,select(expr),contains(element),insideisempty(exp),any(cond),all(cond),any(gen; cond),all(gen; cond)✂️ String Operations
startswith(str),endswith(str)ltrimstr(str),rtrimstr(str),trimstr(str)split(str),join(str)🗃️ Array/Collection Transformation
map(f),map_values(f),with_entries(f)flatten(depth),combinations(n),add(generator)📊 Sorting, Grouping & Extrema
sort_by(path),group_by(path),unique_by(path)min_by(path),max_by(path)🔎 Search & Indexing
index(s),rindex(s),indices(s),bsearch(x)🗺️ Path Expressions & Structural Manipulation
path(expr),paths(filter),pick(pathexps),del(expr)getpath(PATHS),delpaths(PATHS),setpath(PATHS; VALUE)🔁 Generators & Iteration
range(upto),range(from; upto),range(from; upto; by)limit(n; expr),skip(n; expr),first(expr),last(expr)nth(n),nth(n; expr)while(cond; update),until(cond; next),repeat(exp)recurse(f),recurse(f; cond),walk(f)error(message),halt_error(exit_code),$__loc__🧵 String Interpolation
\(expr)inside string literals — full support for nested expressions🛡️ try-catch & Error Handling
try EXP catch EXP,try EXP(shorthand),error(0-arg)?operator as syntactic sugar fortry EXP📐 Variables & Binding
EXP as $identifier | .... as [$a, $b],. as {$a, $b},. as {key: $var}$ENVvariable🔄 reduce & foreach
reduce EXP as $var (INIT; UPDATE)foreach EXP as $var (INIT; UPDATE; EXTRACT)🧩 User-Defined Functions
def name: body;def name(f)— filter argumentsdef name($var)— value arguments (syntactic sugar)🖊️ Assignment Operators
|==+=,-=,*=,/=,%=,//=select, etc.)🎨 Format Strings & Escaping
@base64,@base64d,@html,@uri,@urid,@csv,@tsv,@sh,@json,@text@foo "string with \(expr)"🔡 Regular Expressions
test(val),test(regex; flags)match(val),match(regex; flags),capture(val),capture(regex; flags)scan(regex),scan(regex; flags)split(regex; flags),splits(regex),splits(regex; flags)sub(regex; tostr),sub(regex; tostr; flags)gsub(regex; tostr),gsub(regex; tostr; flags)➗ Math Functions
acos,acosh,asin,asinh,atan,atanh,cbrt,ceil,cos,cosh,erf,erfc,exp,exp2,expm1,fabs,floor,log,log10,log2,round,sin,sinh,tan,tanh,trunc, and moreatan2,pow,fmax,fmin,fmod,hypot,remainder, and morefma📅 Date Functions
now,todate,fromdate,todateiso8601,fromdateiso8601strptime(fmt),strftime(fmt),strflocaltime(fmt)gmtime,localtime,mktime🚦 Advanced Control Flow
label $name | ... break $name ...?//INDEX,IN,JOIN📡 JSONL / NDJSON Streaming
📦 Modules
include RelativePathString [<metadata>];— include modules with path resolution and cachingimport RelativePathString as NAME [<metadata>];— import modules as a namespaceimport RelativePathString as $NAME [<metadata>];— import data modules as a variableFull Changelog: https://github.com/devlooped/JQSharp/commits/v1.0.0-beta
Sponsors
The following sponsors made this release possible: @clarius, @MFB-Technologies-Inc, @sandrock, @drivenet, @Keflon, @tbolon, @kfrancis, @unoplatform, @rbnswartz, @jfoshee, @Mrxx99, @eajhnsn1, @davidjenni, @Jonathan-Hickey, @KenBonny, @SimonCropp, @agileworks-eu, @arsdragonfly, @vezel-dev, @ChilliCream, @4OTC, @DominicSchell, @adalon, @Eule02, @torutek, @mccaffers, @SeikaLogiciel, @wizardness.
Thanks 💜
🔗 View Release
Beta Was this translation helpful? Give feedback.
All reactions