pass warnflags to json output. closes #4