@@ -389,41 +389,9 @@ class SensorDataConverter {
389389 writeJsonObject (reading, outfile);
390390 outfile << sp << " ]" ;
391391 }
392- } else {
393- // JSON format - preserve line-by-line structure
394- for (const auto & line : lines) {
395- if (line.empty ()) continue ;
396-
397- // If no filtering, pass through the original line
398- if (!hasActiveFilters ()) {
399- if (!firstOutput) outfile << " \n " ;
400- firstOutput = false ;
401- outfile << line;
402- } else {
403- // Parse, filter, and rebuild the line
404- auto readings = JsonParser::parseJsonLine (line);
405- std::vector<std::map<std::string, std::string>> filtered;
406-
407- for (const auto & reading : readings) {
408- if (reading.empty ()) continue ;
409- if (shouldIncludeReading (reading)) {
410- filtered.push_back (reading);
411- }
412- }
413-
414- if (!filtered.empty ()) {
415- if (!firstOutput) outfile << " \n " ;
416- firstOutput = false ;
417- outfile << " [" << sp;
418- for (size_t i = 0 ; i < filtered.size (); ++i) {
419- if (i > 0 ) outfile << " ," << sp;
420- writeJsonObject (filtered[i], outfile);
421- }
422- outfile << sp << " ]" ;
423- }
424- }
425- }
426392 }
393+ // Note: JSON stdin → JSON output uses the streaming path in convert(),
394+ // so this function is only called for CSV input → JSON output.
427395 }
428396
429397 // Check if a reading passes date filter
0 commit comments