Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap component trigger results into JsonObject #118

Open
stas-fomenko opened this issue Nov 15, 2019 · 2 comments
Open

Wrap component trigger results into JsonObject #118

stas-fomenko opened this issue Nov 15, 2019 · 2 comments

Comments

@stas-fomenko
Copy link

Wrap all results that are non-JSONObject into {"result": <message>}.

Currently, we implement this in components, but it makes sense to implement it once in the sailor, as there are already at least 2 components that have they wrapped results into JSONObject in theirs code: restapi, salesforce (Magic updates).

This will keep stable runtime mapper processing of messages at the next steps.

@hannah-bulmer
Copy link

Are there any components that might emit data as an array? Would this be backwards compatible for them if they became wrapped in a {result: array} object?

@stas-fomenko
Copy link
Author

Are there any components that might emit data as an array?

No, currently component output should be as a JSON Object, as platform mapper has some issues with arrays, so we try to avoid arrays in output

Would this be backwards compatible for them if they became wrapped in a {result: array} object?

I'm not sure, we briefly discussed it with @kirill-levitskiy, but this task must be discussed with the whole team

@stas-fomenko stas-fomenko changed the title Wrap component results into JsonObject Wrap component trigger results into JsonObject Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants