Giter VIP home page Giter VIP logo

Comments (8)

mtth avatar mtth commented on May 28, 2024

Good idea. Will include this in a future release.

from avsc.

carlos-markavip avatar carlos-markavip commented on May 28, 2024

OK, thanks for the quick reply. I'm in a hurry so I'll go ahead and implement this for my needs.
If you've got some thoughts about how you'd like to see this written I'd love to read them. That would improve the odds of contributing some generally useful code.

from avsc.

mtth avatar mtth commented on May 28, 2024

I'd like to think some more about how best to implement logical types, no definite ideas yet. I'm happy to review your code if you submit a pull request.

For your use-case, I wonder if being able to set the schema written by the BlockEncoder would be sufficient? If so, it would be straightforward to add a new key (e.g. schema) to its constructor's options, defaulting to the type's canonical schema.

from avsc.

carlos-markavip avatar carlos-markavip commented on May 28, 2024

For my current use case that would probably be enough for now, yes

from avsc.

mtth avatar mtth commented on May 28, 2024

Great, let's start with that then.

And come to think of it, it would be even better to change the first argument of BlockEncoder (and related functions) to accept a schema rather than only a type. The behavior would be consistent with parse, backwards compatible, and save adding a new option (along with the necessary compatibility check that would have been required).

If you can wait until tomorrow morning, I'll get this change out then.

from avsc.

carlos-markavip avatar carlos-markavip commented on May 28, 2024

Tomorrow would be great, thanks. I've made the change you suggested locally already, and it will be trivial the change the calling code again.

from avsc.

mtth avatar mtth commented on May 28, 2024

Done in df20230 and released in 2.4.0.

from avsc.

carlos-markavip avatar carlos-markavip commented on May 28, 2024

works for me, thanks

from avsc.

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.