shithub: mc

ref: d1e7671e6bd6a12d5444716bfbcd3e88ba7e3b5f
dir: /lib/json/types.myr/

View raw version
use std

pkg json =
	type elt = union
		`Null
		`Bool	bool
		`Num	flt64
		`Str	byte[:]
		`Arr	elt#[:]
		`Obj	(byte[:], elt#)[:]
	;;

	type err = struct
		e	: errtype
		line	: std.size
		off	: std.size
	;;

	type errtype = union
		`Badesc char
		`Junk char
		`Depth
		`End
	;;
;;