Binary JData
A portable interchange format for complex binary data - efficient, strongly-typed, and quasi-human-readable
๐ Synopsis
Format overview
๐ข Type Markers
Data type reference
๐ N-D Arrays
Multi-dimensional data
โก Optimized
Compact containers
๐ BJData Format Synopsis
[type] [length]? [data]?
i=int8 U=uint8 I=int16
l=int32 L=int64 d=float32
{ ... } = object
$=type #=count
{ i3val i42 } โ Little-Endian
๐ข Type Marker Reference
u uint16, m uint32, M uint64, h float16๐ N-Dimensional Arrays
Native packed arrays with row-major or column-major ordering.
// 2ร3 uint8 matrix (row-major)
[[] [$][U] [#][[] [$][U][#][i][2] [2][3]
[1][2][3] // row 0
[4][5][6] // row 1
// Column-major: wrap dims in [[]]
[[] [$][U] [#][[] [[]...[]]
[1][4][2][5][3][6]
โก Optimized Containers
Use $ (type) and # (count) for compact storage.
// Regular array (with type markers)
[[] [d][1.5] [d][2.5] [d][3.5] []]
// Optimized: type + count header
[[] [$][d] [#][i][3]
[1.5] [2.5] [3.5]
// No end marker, no type markers!
// Valid types: i,U,I,u,l,m,L,M,h,d,D,C,B
BJData extends JSON with binary encoding and N-dimensional arrays for scientific computing. Version 1 (Draft 3) - Frozen March 23, 2025. All values in Little-Endian order.
![[Home]](upload/neurojson_banner_plain.png)