Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Add MarshalJSON to kinesis event #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matejsladek
Copy link

Add MarshalJSON function to correctly interpreting timestamp of kinesis event

@fsenart
Copy link
Contributor

fsenart commented Dec 13, 2017

Hi @matejsladek,

First of all, thank you very much for contributing to the project.

Can you please explain me why the MarshalJSON is needed for the timestamp private type?
We use the timestamp type only during the unmarshaling phase along with type aliasing to correctly decode the custom AWS time format from the raw kinesis event. After what the final public Record type has a usual time.Time ApproximateArrivalTimestamp and we do not need any other trick to handle its marshaling.

https://github.com/eawsy/aws-lambda-go-event/blob/master/service/lambda/runtime/event/kinesisstreamsevt/definition.go#L39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants