MFC r275552: MFV r260710 + 275532:Add a new method, nvlist_print_json to allow libnvpair to emit JSON.