Skip to content

Commit f5ca317

Browse files
[Gate] reduce the size of Json start to optimize
1 parent 8ad7fe2 commit f5ca317

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tool_services/gate/TinyJSON/convert.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void Convert_DataToMsg(service_t *service, char *data)
132132
return;
133133
}
134134

135-
json_t const *services = json_getProperty(root, "services");
135+
json_t const *services = json_getProperty(root, "s");
136136
// Get services
137137
if (services != 0)
138138
{
@@ -731,8 +731,8 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
731731
// This function start a Json structure and return the string size.
732732
uint16_t Convert_StartData(char *data)
733733
{
734-
memcpy(data, "{\"services\":{", sizeof("{\"services\":{"));
735-
return (sizeof("{\"services\":{") - 1);
734+
memcpy(data, "{\"s\":{", sizeof("{\"s\":{"));
735+
return (sizeof("{\"s\":{") - 1);
736736
}
737737
// This function start a Service into a Json structure and return the string size.
738738
uint16_t Convert_StartServiceData(char *data, char *alias)

0 commit comments

Comments
 (0)