entry.pushKV("hex",EncodeHexTx(tx));// the hex-encoded transaction. used the name "hex" to be consistent with the verbose output of "getrawtransaction".
if(include_hex){
entry.pushKV("hex",EncodeHexTx(tx,serialize_flags));// the hex-encoded transaction. used the name "hex" to be consistent with the verbose output of "getrawtransaction".