File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ template <std::size_t BUFFER_SIZE> class flxFormatJSON : public flxOutputFormat
3838
3939  public: 
4040    // -----------------------------------------------------------------
41-     flxFormatJSON () : buffer_size{BUFFER_SIZE} {};
41+     flxFormatJSON () : buffer_size{BUFFER_SIZE}, _isFirstRun{ true }  {};
4242
4343    // -----------------------------------------------------------------
4444    //  value methods
@@ -191,6 +191,12 @@ template <std::size_t BUFFER_SIZE> class flxFormatJSON : public flxOutputFormat
191191            szBuffer[buffer_size] = ' \0 '  ;
192192        }
193193
194+         //  dump out mime type
195+         if  (_isFirstRun)
196+         {
197+             outputObservation (" Content-Type: application/json"  , flxLineTypeMime);
198+             _isFirstRun = false ;
199+         }
194200        //  Send the JSON string to output writers/destinations
195201        outputObservation (szBuffer);
196202
@@ -282,4 +288,6 @@ template <std::size_t BUFFER_SIZE> class flxFormatJSON : public flxOutputFormat
282288
283289private: 
284290    std::vector<flxIWriterJSON *>  _jsonWriters;
291+ 
292+     bool  _isFirstRun;
285293};
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments