zigantic brings Pydantic-style data validation to Zig. With zigantic, you can create rules for your data easily. This helps ensure that your data is correct before using it in your applications. You can define validation rules as types, parse JSON while catching errors automatically, and serialize data without adding extra load to your application.
To start using zigantic, you need to download the software. Follow these simple steps:
.zip, .tar.gz, or another type of archive.After extracting the files, follow these steps to run zigantic:
Win + R, type cmd, and hit Enter.cd command to go to the folder where you extracted zigantic. For example, if you extracted it to a folder called zigantic, type cd path/to/zigantic../zigantic (Linux/macOS) or zigantic.exe (Windows) and press Enter.You can easily define validation rules as types. Here is a simple example to demonstrate:
const std = @import("std");
fn exampleValidation() void {
const myData = MyData{
id: 123,
name: "Sample",
};
// Validate myData...
}
const MyData = struct {
id: u32,
name: []const u8,
};
Replace MyData with your own structure to adapt the validation rules as per your needs.
If you have questions or need help, open an issue on the Issues page. You can also contribute to the project by submitting a pull request.
The zigantic team plans to add more features in the future, including:
Thanks to the Zig community for providing valuable feedback and support throughout the development of zigantic.
For direct inquiries, feel free to reach out via email at [youremail@example.com].
To download zigantic, visit the Releases page and choose your version. Follow the previous steps to get started.