json.h 960 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <library/cpp/monlib/encode/encoder.h>
  3. #include <library/cpp/monlib/encode/format.h>
  4. class IOutputStream;
  5. namespace NMonitoring {
  6. class TJsonDecodeError: public yexception {
  7. };
  8. IMetricEncoderPtr EncoderJson(IOutputStream* out, int indentation = 0);
  9. /// Buffered encoder will merge series with same labels into one.
  10. IMetricEncoderPtr BufferedEncoderJson(IOutputStream* out, int indentation = 0);
  11. IMetricEncoderPtr EncoderCloudJson(IOutputStream* out,
  12. int indentation = 0,
  13. TStringBuf metricNameLabel = "name");
  14. IMetricEncoderPtr BufferedEncoderCloudJson(IOutputStream* out,
  15. int indentation = 0,
  16. TStringBuf metricNameLabel = "name");
  17. void DecodeJson(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel = "name");
  18. }