summaryrefslogtreecommitdiff
path: root/src/unstable/json.h
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2017-06-05 14:32:08 -0700
committerMike Buland <mbuland@penny-arcade.com>2017-06-05 14:32:08 -0700
commit8e0f468e79263dc7f9a6364ca1a26036906642bc (patch)
tree7acc4a4e659ae5e429452f2c8f18ddc74a41dba9 /src/unstable/json.h
parent863d9bca2b58d6de22dc2d23379a8c7a5fd755f4 (diff)
downloadlibbu++-8e0f468e79263dc7f9a6364ca1a26036906642bc.tar.gz
libbu++-8e0f468e79263dc7f9a6364ca1a26036906642bc.tar.bz2
libbu++-8e0f468e79263dc7f9a6364ca1a26036906642bc.tar.xz
libbu++-8e0f468e79263dc7f9a6364ca1a26036906642bc.zip
Json?
I'm honestly not sure what kind of interface I want here, or how to organize it. It may just be better to expand the whole thing, spread it out some.
Diffstat (limited to 'src/unstable/json.h')
-rw-r--r--src/unstable/json.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/unstable/json.h b/src/unstable/json.h
new file mode 100644
index 0000000..660d1c6
--- /dev/null
+++ b/src/unstable/json.h
@@ -0,0 +1,90 @@
1#ifndef BU_JSON_H
2#define BU_JSON_H
3
4namespace Bu
5{
6 class Json
7 {
8 public:
9 Json();
10 virtual ~Json();
11
12 public:
13 enum Type
14 {
15 tObject,
16 tArray,
17 tString,
18 tNumber,
19 tBoolean,
20 tNull
21 };
22
23 class Base
24 {
25 public:
26 Base();
27 virtual ~Base();
28
29 virtual Type getType()=0;
30 };
31
32 class Object : public Base
33 {
34 public:
35 Object();
36 virtual ~Object();
37
38 virtual Type getType();
39 };
40
41 class Array : public Base
42 {
43 public:
44 Array();
45 virtual ~Array();
46
47 virtual Type getType();
48 };
49
50 class String : public Base
51 {
52 public:
53 String();
54 virtual ~String();
55
56 virtual Type getType();
57 };
58
59 class Number : public Base
60 {
61 public:
62 Number();
63 virtual ~Number();
64
65 virtual Type getType();
66 };
67
68 class Boolean : public Base
69 {
70 public:
71 Boolean();
72 virtual ~Boolean();
73
74 virtual Type getType();
75 };
76
77 class Null : public Base
78 {
79 public:
80 Null();
81 virtual ~Null();
82
83 virtual Type getType();
84 };
85
86 private:
87 };
88};
89
90#endif