JEXL Extended Documentation

Complete guide to JEXL Extended across JavaScript, Python, and C# implementations

JEXL Extended Documentation

Welcome to JEXL Extended, a powerful context-based expression parser and evaluator with 80+ built-in functions. Available in multiple programming languages with identical JEXL syntax.

Available Implementations

🟨 JavaScript/TypeScript

🐍 Python

🔷 C#

  • Repository: JexlNet
  • Installation: Install-Package JexlNet
  • Documentation: C# Guide

Quick Examples

The same JEXL expressions work across all implementations:

JavaScript:

import jexl from 'jexl-extended';
const result = jexl.evalSync('user.name | uppercase', { user: { name: 'John' } });
// "JOHN"

Python:

from pyjexl_extended import jexl
result = jexl.eval('user.name | uppercase', {'user': {'name': 'John'}})
# "JOHN"

C#:

using JexlNet;
var jexl = new Jexl(new ExtendedGrammar());
var result = jexl.Eval("user.name | uppercase", new { user = new { name = "John" } });
// "JOHN"

Universal Language Guide

The JEXL language syntax is identical across all implementations:

📖 Language Reference

Function Reference

Complete documentation for all 80+ functions:

Usage Guides

Choose your programming language for detailed usage instructions:

JavaScript Implementation

  • Installation with npm/yarn
  • Basic usage and integration patterns
  • Monaco Editor setup with IntelliSense
  • TypeScript support and type definitions
  • Performance optimization techniques

🐍 Python Implementation

  • Installation with pip
  • Basic usage patterns
  • Integration with Flask/Django
  • Error handling strategies
  • Performance considerations

🔷 C# Implementation

  • NuGet package installation
  • Basic usage with JsonNode
  • ASP.NET Core integration
  • Async/sync evaluation patterns
  • Custom functions and transforms

🎮 Interactive Playground

Try JEXL Extended expressions online with our interactive playground:

Launch Playground →

The playground features:

  • Live Expression Editor - Monaco Editor with syntax highlighting and IntelliSense
  • Real-time Evaluation - See results as you type
  • Sample Data - Pre-loaded with example contexts
  • Save & Share - Save your expressions for later
  • Examples Library - Learn from practical examples

📖 Playground Guide - Learn how to use all playground features

Key Features

  • 🚀 80+ Built-in Functions - String manipulation, math, arrays, objects, dates, and more
  • 🎨 Monaco Editor Support - Syntax highlighting, IntelliSense, and hover documentation
  • 📝 TypeScript Support - Full type definitions included
  • 🔧 Modular - Use the entire library or import individual functions

Examples

Data Transformation

// Transform an array of users
const users = [
  { name: "Alice", age: 28, department: "Engineering" },
  { name: "Bob", age: 32, department: "Marketing" },
  { name: "Charlie", age: 24, department: "Engineering" }
];

// Get names of engineers older than 25
jexl.evalSync('users|filter("value.department == \\"Engineering\\" && value.age > 25")|map("value.name")', { users });
// ["Alice"]

String Processing

// Process and format text
jexl.evalSync('"hello world" | uppercase | split(" ") | join("-")');
// "HELLO-WORLD"

Mathematical Operations

// Calculate statistics
jexl.evalSync('numbers | sum / length(numbers)', { numbers: [1, 2, 3, 4, 5] });
// 3 (average)

Contributing

JEXL Extended is open source. Contributions are welcome! Please see our GitHub repository for more information.

License

MIT License - see LICENSE file for details.

Cookie Notice

We use cookies to enhance your browsing experience.