Skip to content

USDJ JSON representation

Syoyo Fujita edited this page Jul 20, 2025 · 3 revisions

What is USDJ?

JSON representation of USD.

Advantage

Since its a JSON, it can be parsed and edited in various tools

Status

USDJ JSON representation is TinyUSDZ specific, and work-in-progress.

Design

A mixture of USDA and USDC(Crate).

For example, "uniform float[] myarray = [...]" can be represented as:

{ "name" : "myarray",
  "typeName" : "float[]",
  
  "variability" : "uniform",
  "value" : "[1.0, 2.0, 1.0]"  # or Base-122/Base64 string for storage efficiency 
}  

Binary and int/float array value can be represented as Base-122(Preferred) and Base-64(for compatibility)

Base-122 Binary encoding

We'd like to support Base-122 (~14%) for smaller inflation than Base64

https://github.com/kevinAlbs/Base122

which is compatible with Web(UTF-8) platform.

Idea: JSON + SafeTensors(Binary)

Encode USD scene graph with JSON, and store binary data with safetensors format.

JSON

{ "/mesh0" {
  "attributes" : [ "points" ]
}

Safetensors

{ "/mesh0/points.default" : OFFSET0,
  "/mesh0/points.timeSamples" : OFFSET1
}

Advantage

Disadvantage

  • Need extra data consistency check
Clone this wiki locally