File tree Expand file tree Collapse file tree 12 files changed +45
-47
lines changed Expand file tree Collapse file tree 12 files changed +45
-47
lines changed Original file line number Diff line number Diff line change 6
6
// This file is here to help the Arduino IDE find the .cpp files
7
7
8
8
#include " JsonParser/JsonArray.cpp"
9
- #include " JsonParser/JsonHashTable .cpp"
9
+ #include " JsonParser/JsonObject .cpp"
10
10
#include " JsonParser/JsonParserBase.cpp"
11
11
#include " JsonParser/JsonValue.cpp"
12
12
#include " JsonParser/JsonToken.cpp"
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
#include " JsonArray.h"
7
- #include " JsonHashTable .h"
7
+ #include " JsonObject .h"
8
8
9
9
using namespace ArduinoJson ::Parser;
10
10
using namespace ArduinoJson ::Internal;
11
11
12
- DEPRECATED JsonHashTable JsonArray::getHashTable (int index)
12
+ DEPRECATED JsonObject JsonArray::getHashTable (int index)
13
13
{
14
- return (JsonHashTable ) (*this )[index];
14
+ return (JsonObject ) (*this )[index];
15
15
}
16
16
17
17
/*
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ namespace ArduinoJson
13
13
{
14
14
namespace Parser
15
15
{
16
- class JsonHashTable ;
16
+ class JsonObject ;
17
17
18
18
class JsonArray
19
19
{
@@ -73,7 +73,7 @@ namespace ArduinoJson
73
73
return (double ) (*this )[index];
74
74
}
75
75
76
- DEPRECATED JsonHashTable getHashTable (int index);
76
+ DEPRECATED JsonObject getHashTable (int index);
77
77
78
78
DEPRECATED long getLong (int index)
79
79
{
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ namespace ArduinoJson
12
12
{
13
13
namespace Parser
14
14
{
15
- class JsonHashTable ;
16
-
17
15
class JsonArrayIterator
18
16
{
19
17
public:
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
#include < string.h> // for strcmp()
7
- #include " JsonHashTable.h"
8
7
#include " JsonArray.h"
8
+ #include " JsonObject.h"
9
9
#include " JsonValue.h"
10
10
11
11
using namespace ArduinoJson ::Parser;
12
12
using namespace ArduinoJson ::Internal;
13
13
14
- DEPRECATED JsonArray JsonHashTable ::getArray (const char * key)
14
+ DEPRECATED JsonArray JsonObject ::getArray (const char * key)
15
15
{
16
16
return (*this )[key];
17
17
}
18
18
19
19
/*
20
20
* Returns the token for the value associated with the specified key
21
21
*/
22
- JsonValue JsonHashTable ::getValue (const char * desiredKey)
22
+ JsonValue JsonObject ::getValue (const char * desiredKey)
23
23
{
24
24
// sanity check
25
25
if (desiredKey == 0 || !token.isObject ())
Original file line number Diff line number Diff line change @@ -13,13 +13,17 @@ namespace ArduinoJson
13
13
{
14
14
class JsonArray ;
15
15
16
- class JsonHashTable
16
+ class JsonObject
17
17
{
18
- friend class JsonValue ;
19
-
20
18
public:
21
19
22
- JsonHashTable ()
20
+ JsonObject (char * json, Internal::JsonToken token)
21
+ : json(json), token(token)
22
+ {
23
+
24
+ }
25
+
26
+ JsonObject ()
23
27
: token(Internal::JsonToken::null())
24
28
{
25
29
}
@@ -51,7 +55,7 @@ namespace ArduinoJson
51
55
return getValue (key);
52
56
}
53
57
54
- DEPRECATED JsonHashTable getHashTable (const char * key)
58
+ DEPRECATED JsonObject getHashTable (const char * key)
55
59
{
56
60
return getValue (key);
57
61
}
@@ -66,23 +70,19 @@ namespace ArduinoJson
66
70
return getValue (key);
67
71
}
68
72
69
- static JsonHashTable null ()
73
+ static JsonObject null ()
70
74
{
71
- return JsonHashTable ();
75
+ return JsonObject ();
72
76
}
73
77
74
78
private:
75
79
76
- JsonHashTable (char * json, Internal::JsonToken token)
77
- : json(json), token(token)
78
- {
79
-
80
- }
81
-
82
80
char * json;
83
81
Internal::JsonToken token;
84
82
85
83
JsonValue getValue (const char * key);
86
84
};
85
+
86
+ typedef JsonObject JsonHashTable;
87
87
}
88
88
}
Original file line number Diff line number Diff line change 5
5
6
6
#pragma once
7
7
8
- #include " JsonHashTable.h"
9
8
#include " JsonArray.h"
9
+ #include " JsonObject.h"
10
10
11
11
namespace ArduinoJson
12
12
{
@@ -31,7 +31,7 @@ namespace ArduinoJson
31
31
*/
32
32
DEPRECATED JsonArray parseArray (char * json)
33
33
{
34
- return (JsonArray) parse (json);
34
+ return parse (json);
35
35
}
36
36
37
37
/*
@@ -40,9 +40,9 @@ namespace ArduinoJson
40
40
* The content of the string may be altered to add '\0' at the
41
41
* end of string tokens
42
42
*/
43
- DEPRECATED JsonHashTable parseHashTable (char * json)
43
+ DEPRECATED JsonObject parseHashTable (char * json)
44
44
{
45
- return (JsonHashTable) parse (json);
45
+ return parse (json);
46
46
}
47
47
48
48
private:
Original file line number Diff line number Diff line change 5
5
6
6
#include < stdlib.h> // for strtol, strtod
7
7
#include " JsonArray.h"
8
- #include " JsonHashTable .h"
8
+ #include " JsonObject .h"
9
9
#include " JsonValue.h"
10
10
11
11
using namespace ArduinoJson ::Parser;
@@ -18,7 +18,7 @@ JsonValue JsonValue::operator[](int index)
18
18
19
19
JsonValue JsonValue::operator [](const char * key)
20
20
{
21
- return JsonHashTable (json, token)[key];
21
+ return JsonObject (json, token)[key];
22
22
}
23
23
24
24
JsonValue::operator bool ()
@@ -62,9 +62,9 @@ JsonValue::operator JsonArray()
62
62
: JsonArray::null ();
63
63
}
64
64
65
- JsonValue::operator JsonHashTable ()
65
+ JsonValue::operator JsonObject ()
66
66
{
67
67
return token.isObject ()
68
- ? JsonHashTable (json, token)
69
- : JsonHashTable ::null ();
68
+ ? JsonObject (json, token)
69
+ : JsonObject ::null ();
70
70
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ namespace ArduinoJson
22
22
namespace Parser
23
23
{
24
24
class JsonArray ;
25
- class JsonHashTable ;
25
+ class JsonObject ;
26
26
27
27
class JsonValue
28
28
{
@@ -44,7 +44,7 @@ namespace ArduinoJson
44
44
operator long ();
45
45
operator char *();
46
46
operator JsonArray ();
47
- operator JsonHashTable ();
47
+ operator JsonObject ();
48
48
JsonValue operator [](int index);
49
49
JsonValue operator [](const char *key);
50
50
File renamed without changes.
You can’t perform that action at this time.
0 commit comments