Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 928 Bytes

File metadata and controls

44 lines (33 loc) · 928 Bytes

Encode

jsonschema encode <document.json|.jsonl> <output.binpack>
  [--verbose/-v] [--debug/-g]
  [--default-dialect/-d <uri>] [--json/-j] [--configuration/-C <path>]
  [--color auto|always|never]

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