aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/json/json.h
blob: f6968c0016c64cf2be9bd91ebc7059347e8a37d4 (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");

}