Safe-DS / Runner

Execute Safe-DS programs that were compiled to Python.
MIT License
2 stars 0 forks source link

JSON Serialization for user-facing types #20

Closed WinPlay02 closed 10 months ago

WinPlay02 commented 10 months ago

Is your feature request related to a problem?

The runner needs to know how to serialize certain objects to JSON, as they need to be sent to the VS Code extension. Currently, these types would be:

Desired solution

As the json.dumps function is used to encode data, a custom JSONEncoder subclass could be used that encodes these additional values and falls back to the default encoder for all other values (like numbers). The custom encoder can be specified using the cls argument of the json.dumps function.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

Some types like Tables and Images are useful for inspection purposes. They should be able to be displayed in the VS Code extension to show information about the data of a pipeline. Currently, placeholders are sent in the data field of the placeholder_value message.

lars-reimann commented 8 months ago

:tada: This issue has been resolved in version 0.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: