Skip to content

mattn/zig-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-json

Toy implementation of JSON parser.

Usage

const a = std.heap.page_allocator;

var br = reader(std.io.fixedBufferStream(
    \\["foo" , 2]
).reader());
var v = try parse(a, &br);
try std.testing.expect(.Array == v);
try std.testing.expect(std.mem.eql(u8, "foo", v.Array.items[0].String.items));
try std.testing.expect(.Number == v.Array.items[1]);
try std.testing.expectEqual(@as(f64, 2.0), v.Array.items[1].Number);

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages