JDK6 runtime support for json

Warning: the backported try-with-resources are not pretty
closer.rethrow() doesn't wrap `IOException`