Skip to content
Snippets Groups Projects
Commit 61ecc9e7 authored by Tommy Persson's avatar Tommy Persson
Browse files

Fix bug empty list and json coding.

parent 666c342e
No related branches found
No related tags found
No related merge requests found
Pipeline #41255 passed
...@@ -451,6 +451,7 @@ def field_assignment_get_json_value(field, ty, fieldtype, name): ...@@ -451,6 +451,7 @@ def field_assignment_get_json_value(field, ty, fieldtype, name):
listprefix = "// " listprefix = "// "
if ty == "list": if ty == "list":
res = listprefix res = listprefix
res += f'res["{field}"] = Json::arrayValue;'
res += f'for (unsigned int i=0; i<msg.{field}.size(); i++) {{' res += f'for (unsigned int i=0; i<msg.{field}.size(); i++) {{'
res += f'res["{field}"][i] = get_json_value(msg.{field}[i]);' res += f'res["{field}"][i] = get_json_value(msg.{field}[i]);'
res += '}' res += '}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment