You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #1215 I noticed invalid JSON generated (duplicate field name) if requesting alerts when serializing an entity.
Describe the bug
A repeated JSON field alerts appears when serializing an entity that has alerts, the first time to indicate there are alerts, the second time to provide an array of alerts:
{"name": "e1","alerts": true,// <--- repeated field name"components": {"flecs.alerts.AlertsActive": {"info_count": 0,"warning_count": 0,"error_count": 2},"Position": null},"alerts": [// <--- repeated field name{"alert": "position_without_mass.e1_alert_2","message": "e1 has Position but not Mass","severity": "Error"},{"alert": "position_without_velocity.e1_alert_1","message": "e1 has Position but not Velocity","severity": "Error"}]}
To Reproduce
Steps to reproduce the behavior:
See test SerializeEntityToJson_serialize_w_2_alerts in test/meta/src/SerializeEntityToJson.c
Expected behavior
the "alerts": true field perhaps should be renamed to "hasAlerts": true to avoid name collision.
Additional context
Add any other context about the problem here (operating system, hardware, ...).
The text was updated successfully, but these errors were encountered:
While working on #1215 I noticed invalid JSON generated (duplicate field name) if requesting alerts when serializing an entity.
Describe the bug
A repeated JSON field
alerts
appears when serializing an entity that has alerts, the first time to indicate there are alerts, the second time to provide an array of alerts:To Reproduce
Steps to reproduce the behavior:
See test
SerializeEntityToJson_serialize_w_2_alerts
intest/meta/src/SerializeEntityToJson.c
Expected behavior
the
"alerts": true
field perhaps should be renamed to"hasAlerts": true
to avoid name collision.Additional context
Add any other context about the problem here (operating system, hardware, ...).
The text was updated successfully, but these errors were encountered: