shithub: mc

ref: 571472a78619e3314aaf8e95be4f70cea1ef51a8
dir: /lib/json/j.myr/

View raw version
use std
use json

const main = {args : byte[:][:]
	var data

	for arg in args[1:]
		data = std.try(std.slurp(arg))
		match json.parse(data)
		| `std.Ok j:
			std.put("{}\n", j)
			json.free(j)
		| `std.Err e:
			std.put("{}\n", e)
		;;
		std.slfree(data)
	;;
}