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
In converting parameters from Python to SST, the default “give up” converter used to convert to a JSON string. Your new behavior creates a JSON string and then re-parses it to a Python dict. Is there some reason for this change?
I believe that SST converts an unknown data structure into a string, so the data value is passed to C++ as a stringified Python dict. I don’t know how to parse that string in C++. Python’s string converter and JSON are incompatible, so I cannot use the default JSON parser I used before.
The work-around is to convert the parameter to a JSON string before passing the parameter to ahp_graph, so I can get it to work, but I’d like to understand the motivation.
The text was updated successfully, but these errors were encountered:
For the encoding of parameters, I attempted to replicate what was occurring before we switched to orjson so there is no particular reason for it, orjson.dumps just returns a Bytes object and not a string so I'll just have to convert that to a string instead of a dict.
@srkohn says
In converting parameters from Python to SST, the default “give up” converter used to convert to a JSON string. Your new behavior creates a JSON string and then re-parses it to a Python dict. Is there some reason for this change?
I believe that SST converts an unknown data structure into a string, so the data value is passed to C++ as a stringified Python dict. I don’t know how to parse that string in C++. Python’s string converter and JSON are incompatible, so I cannot use the default JSON parser I used before.
The work-around is to convert the parameter to a JSON string before passing the parameter to
ahp_graph
, so I can get it to work, but I’d like to understand the motivation.The text was updated successfully, but these errors were encountered: