1
0
Fork 0

Use the short xml name for properties in JSON

This commit is contained in:
Torsten Dreyer 2014-03-06 18:00:11 +01:00
parent 63e9cbed40
commit 7602089460

View file

@ -51,8 +51,8 @@ static const char * getPropertyTypeString( simgear::props::Type type )
static cJSON * PropToJson( SGPropertyNode_ptr n )
{
cJSON * jsonProp = cJSON_CreateObject();
cJSON_AddItemToObject(jsonProp, "path", cJSON_CreateString(n->getPath().c_str()));
cJSON_AddItemToObject(jsonProp, "name", cJSON_CreateString(n->getDisplayName().c_str()));
cJSON_AddItemToObject(jsonProp, "path", cJSON_CreateString(n->getPath(true).c_str()));
cJSON_AddItemToObject(jsonProp, "name", cJSON_CreateString(n->getName()));
cJSON_AddItemToObject(jsonProp, "value", cJSON_CreateString(n->getStringValue()));
cJSON_AddItemToObject(jsonProp, "type", cJSON_CreateString(getPropertyTypeString(n->getType())));
return jsonProp;