Nim implementation of the Preserves data language
Go to file
Emery Hemingway d5909e4df0 Schema: a collection of breaking changes
- Process all modules in a bundle simultanously so that it can be
   determined if imported types are recursive or take a parameter
- Different rules for deciding when an object must be a ref
- Use Preserve[void] if there is no EmbededTypeName defined
- Put embeddeded types directly into other types without a
  Preserve[E] container
2022-12-10 13:32:36 -06:00
src Schema: a collection of breaking changes 2022-12-10 13:32:36 -06:00
tests Schema: a collection of breaking changes 2022-12-10 13:32:36 -06:00
.gitignore Schemas: use canonical meta-schema 2021-10-17 13:26:05 +02:00
.gitmodules Remove submodule 2022-02-19 10:33:16 -06:00
README.md Update upstream URLs 2022-06-12 23:05:15 -05:00
Tuprules.tup More Tupfiles 2022-12-05 15:56:31 -06:00
UNLICENSE Unlicense 2021-08-31 17:00:00 +02:00
preserves.nimble Schema: a collection of breaking changes 2022-12-10 13:32:36 -06:00
schema.bin Remove submodule 2022-02-19 10:33:16 -06:00
schema.prs Remove submodule 2022-02-19 10:33:16 -06:00

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.