Coder Social home page Coder Social logo

Comments (4)

calvinfo avatar calvinfo commented on August 26, 2024

Strong +1

On Wed, Apr 20, 2016 at 3:59 PM, Achille [email protected] wrote:

@f2prateek https://github.com/f2prateek
@calvinfo https://github.com/calvinfo

Currently the timestamp and sentAt fields have a string type in the data
structures (Alias, Track, ...), this is not very handy and developers
have to refer to the HTTP API documentation to understand what format this
should be in (which isn't linked from the Go code).

I feel like we should use time.Time for these fields and take care of the
serialization internally so we take the burden off of the developers using
the library and leverage the compiler to verify that they're using valid
values (basically a time value, right now they could inject whatever string
format in there).

Let me know what you think about it?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#56

from analytics-go.

f2prateek avatar f2prateek commented on August 26, 2024

Yup agree, time.Time is better (we do this in java, android too) and we don't even need any magic for serialization because the default format is iso 8601.

from analytics-go.

achille-roussel avatar achille-roussel commented on August 26, 2024

Yep, although the Go serializer uses nanosecond precision while the JS serializer uses milliseconds, any change this is gonna be an issue server side?

from analytics-go.

calvinfo avatar calvinfo commented on August 26, 2024

Should be good, as long as it serializes to an ISO timestamp. Node just
drops the extra precision.

On Wed, Apr 20, 2016 at 4:07 PM, Achille [email protected] wrote:

Yep, although the Go serializer uses nanosecond precision while the JS
serializer uses milliseconds, any change this is gonna be an issue server
side?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#56 (comment)

from analytics-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.