Code Monkey home page Code Monkey logo

Comments (6)

cowtowncoder avatar cowtowncoder commented on September 5, 2024 1

If there is indeed variant to convert to/from long, supporting @JsonFormat(shape=Shape.NUMBER) would make sense I think? Support should also require deserializer handling.

from jackson-modules-java8.

kewne avatar kewne commented on September 5, 2024

Yep, both serialization and deserialization should be supported, and using shape=Shape.Number too.

I've forked the repo to try to work on this myself but the build fails with missing poms, is there a specific layout that's needed for building?

from jackson-modules-java8.

kevinjom avatar kevinjom commented on September 5, 2024

@kewne in my experience, clone the jackson-bom repo, run mvn clean install and then go back to this repo, run whatever you want.

from jackson-modules-java8.

kewne avatar kewne commented on September 5, 2024

@kevinjom Got it working, thanks!

@cowtowncoder I'm looking through the code but I'm having difficulty understanding the rationale behind some of the formatting: some zeroes are added to the fractional part of the result "to avoid interpretation as integral number".
I've also found FasterXML/jackson-datatype-jsr310#67 which references something similar, what's the desired format?

from jackson-modules-java8.

cowtowncoder avatar cowtowncoder commented on September 5, 2024

@kewne excellent! I did not write this module originally, so some of the logic predates my changes. I don't recall part about additional zeroes, which should not be necessary to just differentiate between JSON integers vs floating-point numbers.

from jackson-modules-java8.

cowtowncoder avatar cowtowncoder commented on September 5, 2024

As per notes on PR, will merge as soon as we get CLA; will make it in 2.9(.0.pr3)

from jackson-modules-java8.

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.