Nim implementation of the Preserves data language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Emery Hemingway 66a653a775
Fix expand of embedded Preserves
2 months ago
src Fix expand of embedded Preserves 2 months ago
tests Rewrite tupfiles 2 months ago
.gitignore Schemas: use canonical meta-schema 1 year ago
.gitmodules Remove submodule 12 months ago
README.md Update upstream URLs 8 months ago
UNLICENSE Unlicense 1 year ago
preserves.nimble Fix expand of embedded Preserves 2 months ago
schema.bin Remove submodule 12 months ago
schema.prs Remove submodule 12 months ago

README.md

Preserves

Nim implementation of the Preserves data language.

Library

To parse or produce Preserves one should write a schema and generate a Nim module using the preserves_schema_nim utility. This module will contain Nim types corresponding to schema definitions. The toPreserve andfromPreserve routines will convert Nim types to and from Preserves. The decodePreserves, parsePreserves, encode, and $ routines will convert Preserve objects to and from binary and textual encoding.

To debug the toPreserves and fromPreserves routines compile with -d:tracePreserves.

Utilities

  • preserves_schema_nim
  • preserves_encode
  • preserves_decode
  • preserves_from_json
  • preserves_to_json

Installation

preserves_encode is a multi-call binary that implements preserves_encode, preserves_decode, preserves_from_json, and preserves_to_json, so the appropriate symlinks should be created during packaging.