parser / writer for some kind of degenerate JSON (C)