aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json/json.h
blob: 2f0c8b0e1d203e8a5d5a5cedb2bf9383a64496b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once 
 
#include <library/cpp/monlib/encode/encoder.h> 
#include <library/cpp/monlib/encode/format.h> 
 

class IOutputStream; 
 
namespace NMonitoring { 

    class TJsonDecodeError: public yexception {
    };

    IMetricEncoderPtr EncoderJson(IOutputStream* out, int indentation = 0); 
 
    /// Buffered encoder will merge series with same labels into one.
    IMetricEncoderPtr BufferedEncoderJson(IOutputStream* out, int indentation = 0); 

    IMetricEncoderPtr EncoderCloudJson(IOutputStream* out,
                                       int indentation = 0,
                                       TStringBuf metricNameLabel = "name");

    IMetricEncoderPtr BufferedEncoderCloudJson(IOutputStream* out,
                                               int indentation = 0,
                                               TStringBuf metricNameLabel = "name");

    void DecodeJson(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel = "name");
 
}