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
{{ message }}
Repository navigation
[GS] expression command could give better return values #620
Describe the bug
Currently the expression command always return a string value, but the json format used could support int, float, bool and complex values (dictionaries).
To Reproduce
Steps to reproduce the behavior:
Run any gama model
in a client ask for the color value of the simulation
See something like 'color[transparent]'
Expected behavior
int, float and bool values could be unpacked and do not need to be wrapped into a string, complex objects could be serialized into json objects. For example a color would be something like this:
Actually I've noticed that the expression command had a hidden escaped parameter that is meant to do exactly that, the problem is that it doesn't work for rgb for some reason.
So this raises three different problems:
fix the json parse of rgb used in GamaServerMessage
document the escaped parameter that was written nowhere except in the code
Activity
lesquoyb commentedon May 8, 2025
Actually I've noticed that the
expressioncommand had a hiddenescapedparameter that is meant to do exactly that, the problem is that it doesn't work for rgb for some reason.So this raises three different problems:
GamaServerMessageescapedparameter that was written nowhere except in the codelesquoyb commentedon May 9, 2025
Finally I've directly added a json parse of the the return value automatically and removed the
escapedparameter. It is now fixed