Skip to content

Incorrect kafka example event and marshaling #390

Closed
@LegNeato

Description

@LegNeato

Incorrect kafka example event and marshaling.

#385 changed the logic and example data. In that PR, there was a comment "Array and slice values encode as JSON arrays, except that []byte encodes as a base64-encoded string, and a nil slice encodes as the null JSON value."

So while the Go code was changed to []byte, the example event checked in doesn't have the value as a base64-encoded string and instead includes a json array.

Either the Go code should change to an Array or slice or the example event should be changed to include a base64 string. I am not sure which is correct (I haven't used this event type so I don't know what AWS sends), but they currently do not match--which is why the assertion had to be incorrectly deleted.

This is breaking code generation in calavera/aws-lambda-events#39 as we actually assert the event can be round-tripped and use the aforementioned byte[] encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions