Skip to content

Array support in ndjson input codec #5874

@sivagnanam-arumugam

Description

@sivagnanam-arumugam

Is your feature request related to a problem? Please describe.
ndjson input codec does not support json array line.
Example:
[{"key1":"value1"},{"key2":"value2"}] -> should be converted into three event objects
This case is handled in logstash ndjson input codec.

Describe the solution you'd like
When prepper reads from a source and the new line is a array string, then prepper should convert the array into n number of objects and publish it.

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context
nsjson input codec is working fine for json new line inputs, but not working for if the new line is an array of json objects.
{"key1":"value1"} : Working
[{"key1":"value1"},{"key2":"value2"}]: Not working

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions