blob: 8e0e6923fca1433159f026a1080d0d80cc7a0f48 (
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
30
31
32
33
34
35
36
37
38
|
#pragma once
#include <util/generic/strbuf.h>
#include <util/generic/yexception.h>
namespace NJson {
class TJsonException: public yexception {
};
class TJsonCallbacks {
public:
explicit TJsonCallbacks(bool throwException = false)
: ThrowException(throwException)
{
}
virtual ~TJsonCallbacks();
virtual bool OnNull();
virtual bool OnBoolean(bool);
virtual bool OnInteger(long long);
virtual bool OnUInteger(unsigned long long);
virtual bool OnDouble(double);
virtual bool OnString(const TStringBuf&);
virtual bool OnOpenMap();
virtual bool OnMapKey(const TStringBuf&);
virtual bool OnCloseMap();
virtual bool OnOpenArray();
virtual bool OnCloseArray();
virtual bool OnStringNoCopy(const TStringBuf& s);
virtual bool OnMapKeyNoCopy(const TStringBuf& s);
virtual bool OnEnd();
virtual void OnError(size_t off, TStringBuf reason);
protected:
bool ThrowException;
};
}
|