Skip to content

Handling null values in JSON input #856

Open
@obermeier

Description

Apache StreamPipes version

dev (current development state)

Affected StreamPipes components

Backend, Connect, Processing Elements, UI

What happened?

Some of my JSON data consumed by an input adapter have null values.
E.g. {"name": 1, "age": null}

This leads to a NPE when guessing the schema.

In my local SP version I just replaced the null value after parsing with a java.util.Optional and a custom runtime type.
This works most of the time especially if the field datatype is string.

But I think this is not a complete solution since the behavior in processors and output adapters is not defined.

What do you think how this kind of data should be handed?

How to reproduce?

No response

Expected behavior

No response

Additional technical information

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpipeline elementsRelates to pipeline elementsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions