shithub: mc

ref: e3a9307d99e1a2936e63b6ffa5d80a5929d4b549
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)
	;;
}