This is a Zig Syrup implementation.
This library hasn't been checked for security issues. Use at your own risk.
See The Syrup Specification for details.
Documentation is available using the standard Zig documentation browser.
- Booleans
- Floats
- Doubles
- Positive integers
- Negative integers
- Binary data
- Strings
- Symbols
- Dictionaries
- Sequences
- Records
- Sets
- Booleans
- Floats
- Doubles
- Positive integers
- Negative integers
- Binary data
- Strings
- Symbols
- Dictionaries
- Sequences
- Records
- Sets
Zig Types that can be (de)serialized to Syrup
- integers (any length)
- f32
- f64
- comptime integers
- comptime float (as f64)
- optionals
- enum literals
- arrays
- slices
- vectors
-
[]const u8 - HashMap - need tests
- Set - need tests
- structs
- as Record (label is the type name)
- as Sequence (just the field values)
- as Dictionary (key is the field name)
- unions
- tuples
- general pointers
-
dynamic.Value
- integers (any length)
- f32
- f64
- optionals
- enum literals
- arrays
- slices
- vectors
-
[]const u8 - HashMap
- Set
- structs
- from Record (label is the type name)
- from Sequence (just the field values)
- from Dictionary (key is the field name)
- unions
- tuples
- general pointers
-
dynamic.Value
There is a benchmarking tool available at zig-syrup-benchmark. This also serves an example of how to add the Syrup library to a project.
- ZON to syrup conversion - Zig's ZON format could possibly be converted to Syrup, if we so pleased.
- Serializing Zig structures - Use comptime to convert Zig structs, slices, etc to Syrup format
- Benchmarking -
zig-syrup-benchmark- Could do more.
- Fuzz testing - Zig has fuzz testing support in the standard library we could play with.
-
jsyrupsupport - human readable syrup format- Indented
jsyrup
- Indented
- syrupify - Add support for user function to transform zig struct
-
libsyrup- a C API for the low level syrup serialization - CLI tool - to quickly pretty-print syrup structure and convert to jsyrup, unsure if converting ZON to syrup is useful here without type information, maybe it's possible/useful.