Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 797 Bytes

encode.markdown

File metadata and controls

41 lines (30 loc) · 797 Bytes

Encode

jsonschema encode <document.json|.jsonl> <output.binpack>

This command encodes a JSON document using JSON BinPack schema-less mode. Note this command is considered experimental and its output might not be decodable across versions of this CLI.

Examples

For example, consider the following simple document:

{
  "version": 2.0
}

The JSON BinPack schema-less encoding will result in something like this:

$ xxd output.binpack
00000000: 1308 7665 7273 696f 6e37 02              ..version7.

Encode a JSON document

jsonschema encode path/to/my/document.json path/to/output.binpack

Encode a JSONL dataset

jsonschema encode path/to/my/dataset.jsonl path/to/output.binpack