Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.
/ json Public archive

A (de)serialization library for JSON

License

Notifications You must be signed in to change notification settings

getty-zig/json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

622 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Getty

Version Zig API Reference Build status License

Overview

Getty JSON is a (de)serialization library for the JSON data format.

Installation

  1. Declare Getty JSON as a project dependency with zig fetch:

    zig fetch --save git+https://github.com/getty-zig/json.git#<COMMIT>
  2. Expose Getty JSON as a module in your project's build.zig:

    pub fn build(b: *std.Build) void {
        const target = b.standardTargetOptions(.{});
        const optimize = b.standardOptimizeOption(.{});
    
        const opts = .{ .target = target, .optimize = optimize };   // 👈
        const json_mod = b.dependency("json", opts).module("json"); // 👈
    
        const exe = b.addExecutable(.{
            .name = "my-project",
            .root_source_file = .{ .path = "src/main.zig" },
            .target = target,
            .optimize = optimize,
        });
        exe.root_module.addImport("json", json_mod); // 👈
    
        // ...
    }
  3. Import Getty JSON into your code:

    const json = @import("json");

About

A (de)serialization library for JSON

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages