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

add simple schema editor for output validation and encoding of numeric types #118

Open
mblackstock opened this issue Apr 17, 2022 · 0 comments
Assignees

Comments

@mblackstock
Copy link
Owner

Currently all numbers are sent as float, and integers are encoded as a string, which is a bit odd. We need a way to specify the numeric types of fields in a more consistent and flexible way. This could be generalized to specify the type of each named field in a point for consistency.

One way to do this might be to have a schema editor in the output node that optionally specifies the types of fields in a message by name (boolean, int, uint, float, string). Under the hood this editor could use JSON schema in the configuration.

The output node could have a 'use schema' checkbox, and then you create a list of name/types. When a message is sent to the output node, it would ensure that the correct schema is used, and reject messages that it cannot convert. If a schema is not specified, a default encoding could be used - all numbers are float, strings, booleans sent as is.

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

1 participant