fixed lowerCamelCase issue for get() calls 72/8572/2 73/8573/1 submit/tizen/20130823.201329
authorKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 23 Aug 2013 19:35:11 +0000 (12:35 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 23 Aug 2013 20:02:54 +0000 (13:02 -0700)
packaging/wrt-plugins-ivi.spec
src/Vehicle/JSVehicle.cpp

index 956d6d4..1c4e626 100644 (file)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-ivi
 Summary:    JavaScript plugins for WebRuntime for IVI
-Version:    0.8.0
+Version:    0.8.1
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index b544102..58e0b68 100644 (file)
@@ -145,6 +145,10 @@ JSValueRef JSVehicle::get(JSContextRef context,
                        if(json.str() != "{") json<<",";
 
                        std::string key = (*itr).first;
+
+                       /// make key lowerCamelCase:
+                       std::transform(key.begin(), key.begin()+1, key.begin(), ::tolower);
+
                        GVariant* var = (*itr).second;
 
                        gsize size;
@@ -314,7 +318,7 @@ JSValueRef JSVehicle::set(JSContextRef context,
                
                LoggerD("value type: " << JSValueGetType(context, val));
                
-               /// make sure the property is UpperCamelCase because that's how it look in AMB
+               /// make sure the property is UpperCamelCase because that's how it looks in AMB
                std::transform(result.begin(), result.begin()+1, result.begin(), ::toupper);
                
                objectMap[result] = val;