* @brief Serializes a single pipeline frame into the dryRun response shape. */
| 5889 | * @brief Serializes a single pipeline frame into the dryRun response shape. |
| 5890 | */ |
| 5891 | static QJsonObject dryRunSerializeFrame(const DataModel::PipelineFrame& frame) |
| 5892 | { |
| 5893 | QJsonArray rows; |
| 5894 | for (const auto& row : frame.rows) { |
| 5895 | QJsonArray cells; |
| 5896 | for (const auto& cell : row) |
| 5897 | cells.append(cell); |
| 5898 | |
| 5899 | rows.append(cells); |
| 5900 | } |
| 5901 | |
| 5902 | QJsonObject obj; |
| 5903 | obj[QStringLiteral("rawHex")] = QString::fromLatin1(frame.rawBytes.toHex(' ')); |
| 5904 | obj[QStringLiteral("rawByteCount")] = static_cast<int>(frame.rawBytes.size()); |
| 5905 | obj[QStringLiteral("decoderOutput")] = frame.decoderOutput; |
| 5906 | obj[QStringLiteral("decoderIsBinary")] = frame.decoderProducedBinary; |
| 5907 | obj[QStringLiteral("rows")] = rows; |
| 5908 | obj[QStringLiteral("rowCount")] = rows.size(); |
| 5909 | return obj; |
| 5910 | } |
| 5911 | |
| 5912 | /** |
| 5913 | * @brief Frame parser dry-run: drives extraction + decoder + parser against caller bytes. |
no test coverage detected