jdict jdict

Universal Dictionary Interface for MATLAB/Octave & Python

🔶 MATLAB/Octave 🐍 Python

A powerful, xarray-inspired data structure that combines the flexibility of Python dictionaries with numerical computing power. Now with JSON Schema validation!

🚀 Unified Access

Works seamlessly with structs, dicts, and containers.Map

🎯 JSONPath Support

Query nested data with powerful JSONPath expressions

🔬 Dimension Labels

xarray-like dimension and coordinate indexing

⚡ Attribute Storage

Attach metadata to any level of your data hierarchy

📦 Data KindsNew

Built-in schemas for uuid, date, time with auto-validation

🛡️ Validated AssignmentNew

Use <= for schema-checked assignments with auto-casting

Scroll to explore

Getting Started

Simple, Intuitive Syntax

Access nested data structures with clean, readable syntax. No more deep struct navigation!

Metadata Management

Attach Attributes Anywhere

Store metadata like dimension names, units, and descriptions alongside your data. Perfect for scientific datasets!

xarray-Inspired

Dimensions & Coordinates

Select data using dimension names and coordinate labels instead of numeric indices. Make your code self-documenting!

Advanced Features

Smart Struct Array Handling

Build struct arrays incrementally with field-by-field or direct struct assignment. Perfect for tabular data!

Powerful Queries

JSONPath Deep Search

Use JSONPath expressions to query complex nested structures. Find data anywhere in your hierarchy!

Data Integrity

JSON Schema Validation

Define and validate your data against JSON Schema. Catch errors early with comprehensive constraint checking!

Inline Schema Definition

Schema via Attributes

Define schema constraints directly as attributes using :keyword syntax. Then export to a full JSON Schema with attr2schema()!

Built-in Data Types

Schema-Guarded KindsNew

Use 'kind' to create objects with built-in schemas. Assignments are automatically validated — no manual validation needed!

uuid date time datetime email uri

Safe Data Mutation

Type Guard with <=New

Use the <= operator for schema-validated assignments with automatic type casting via binType!

Ready to Use

Get Started with jdict

Available for both MATLAB/Octave and Python!

Installation

Key Methods

jd.key.subkey — Navigate
jd.('$..name') — Query by JSONPath
jd.key{'attr'} — Get/set attributes
jd.dim(coords) — Select by dimension
jd.tojson() — Export to JSON
jdict(kind='uuid') — Built-in kinds
jd.setschema(s) — Set JSON Schema
jd.validate() — Validate data
jd.attr2schema() — Build schema
jd.key <= val — Validated assign

Created by Qianqian Fang • Part of the NeuroJSON Project

Powered by Habitat