Skip to content

JSSON v0.0.5 — Brutal Generate

Choose a tag to compare

@CarlosEduJs CarlosEduJs released this 29 Nov 00:26
· 64 commits to main since this release

New Features

Nested map() Support 🔄

JSSON now allows map() transformations inside other map() transformations.
This enables multi-level pipelines, matrix-like generation, combinatorial data creation, and far more expressive logic.

Example:

nested = (0..2 map (g) = (5..6 map (x) = g + x))

Full Support for Nested Arrays 📦

Nested arrays now work everywhere:

  • Inside templates
  • Inside map clauses
  • As direct literal values
  • As intermediate evaluated expressions

JSSON automatically expands, flattens, or structures arrays as needed without losing context.

Universal Range Expressions 🔢

Ranges (0..N) now work in all places where expressions are allowed:

  • Inside arrays
  • Inside map arguments
  • Inside templates
  • Nested within other ranges
  • Used as part of deeper transformations

This makes large-scale data generation extremely simple:

0..9999

Variable Declarations (:=) 📦

Declare variables for reuse and cleaner configuration. Variables are scoped and support shadowing.

host := "localhost"
port := 8080
url = host + ":" + port

Arithmetic Improvements (Division & Modulo) ➗

Arithmetic is now fully stable for / and %.

Modulo (%) and division (/) now work inside map logic, expressions, and nested operations.

Example:

hash = "uid-" + (u.id * 91 % 17)

Invalid operations (like applying modulo directly to an entire range literal) now produce clear semantic errors instead of causing crashes.

Stability & Internal Improvements

  • Better handling of RangeResult values during deep transformations
  • More reliable evaluation order for nested arrays and nested maps
  • Improved safety checks to prevent unexpected binary operations on non-scalar values
  • Cleaner error messages that explain exactly where an invalid operation was attempted
  • Internal prep for future collection operators and functional features

Summary

JSSON v0.0.5 turns the language into a true data-generation powerhouse:

  • Unlimited nesting
  • Unlimited ranges
  • Stable math
  • Cleaner semantics
  • Smarter expansion rules

Large-scale data creation is now faster, safer, and easier than ever.