@@ -26,6 +26,10 @@ namespace ArduinoJson {
2626//  Forward declarations
2727class  JsonArray ;
2828class  JsonBuffer ;
29+ namespace  Internals  {
30+ template  <typename >
31+ class  JsonObjectSubscript ;
32+ }
2933
3034//  A dictionary of JsonVariant indexed by string (char*)
3135// 
@@ -50,33 +54,36 @@ class JsonObject : public Internals::JsonPrintable<JsonObject>,
5054  //  JsonObjectSubscript operator[](TKey)
5155  //  TKey = const std::string&, const String&
5256  template  <typename  TString>
53-   JsonObjectSubscript<const  TString&> operator [](const  TString& key) {
54-     return  JsonObjectSubscript<const  TString&>(*this , key);
57+   Internals::JsonObjectSubscript<const  TString&> operator [](
58+       const  TString& key) {
59+     return  Internals::JsonObjectSubscript<const  TString&>(*this , key);
5560  }
5661  // 
5762  //  JsonObjectSubscript operator[](TKey)
5863  //  TKey = char*, const char*, char[], const char[N], const FlashStringHelper*
5964  template  <typename  TString>
60-   JsonObjectSubscript<TString*> operator [](TString* key) {
61-     return  JsonObjectSubscript<TString*>(*this , key);
65+   Internals:: JsonObjectSubscript<TString*> operator [](TString* key) {
66+     return  Internals:: JsonObjectSubscript<TString*>(*this , key);
6267  }
6368
6469  //  Gets the value associated with the specified key.
6570  // 
6671  //  const JsonObjectSubscript operator[](TKey) const;
6772  //  TKey = const std::string&, const String&
6873  template  <typename  TString>
69-   const  JsonObjectSubscript<const  TString&> operator [](
74+   const  Internals:: JsonObjectSubscript<const  TString&> operator [](
7075      const  TString& key) const  {
71-     return  JsonObjectSubscript<const  TString&>(* const_cast <JsonObject*>( this ), 
72-                                                 key);
76+     return  Internals:: JsonObjectSubscript<const  TString&>(
77+         * const_cast <JsonObject*>( this ),  key);
7378  }
7479  // 
7580  //  const JsonObjectSubscript operator[](TKey) const;
7681  //  TKey = const char*, const char[N], const FlashStringHelper*
7782  template  <typename  TString>
78-   const  JsonObjectSubscript<TString*> operator [](TString* key) const  {
79-     return  JsonObjectSubscript<TString*>(*const_cast <JsonObject*>(this ), key);
83+   const  Internals::JsonObjectSubscript<TString*> operator [](
84+       TString* key) const  {
85+     return  Internals::JsonObjectSubscript<TString*>(
86+         *const_cast <JsonObject*>(this ), key);
8087  }
8188
8289  //  Sets the specified key with the specified value.
@@ -120,8 +127,8 @@ class JsonObject : public Internals::JsonPrintable<JsonObject>,
120127  //  TValue = float, double
121128  template  <typename  TValue, typename  TString>
122129  DEPRECATED (" Second argument is not supported anymore"  )
123-   typename  TypeTraits ::EnableIf<TypeTraits ::IsFloatingPoint<TValue>::value,
124-                                  bool >::type
130+   typename  Internals ::EnableIf<Internals ::IsFloatingPoint<TValue>::value,
131+                                bool >::type
125132      set (const  TString& key, TValue value, uint8_t ) {
126133    return  set_impl<const  TString&, const  JsonVariant&>(key,
127134                                                        JsonVariant (value));
@@ -132,8 +139,8 @@ class JsonObject : public Internals::JsonPrintable<JsonObject>,
132139  //  TValue = float, double
133140  template  <typename  TValue, typename  TString>
134141  DEPRECATED (" Second argument is not supported anymore"  )
135-   typename  TypeTraits ::EnableIf<TypeTraits ::IsFloatingPoint<TValue>::value,
136-                                  bool >::type
142+   typename  Internals ::EnableIf<Internals ::IsFloatingPoint<TValue>::value,
143+                                bool >::type
137144      set (TString* key, TValue value, uint8_t ) {
138145    return  set_impl<TString*, const  JsonVariant&>(key, JsonVariant (value));
139146  }
0 commit comments