GithubHelp home page GithubHelp logo

Comments (10)

ohler55 avatar ohler55 commented on June 9, 2024 1

A bit longer I'm afraid.

from ojg.

ohler55 avatar ohler55 commented on June 9, 2024 1

It is good enough to play around with. I am making my way through unit tests now and will have some changes in the top level (ojg) package but all those functions are for shared internal use only. If you run into anything you would like changed let me know and we can discuss it.

from ojg.

ohler55 avatar ohler55 commented on June 9, 2024 1

v1.11.0 has been released.

from ojg.

ohler55 avatar ohler55 commented on June 9, 2024

What you are asking for makes sense. Of course if a number in JSON is an integer then in some cases it is nice to have it be an integer in the unmarshalled result. Maybe the best of both is to have Marshal returns float64s and then leave oj.Parse to keep JSON integers as int64. What do you think of that approach?

from ojg.

raidancampbell avatar raidancampbell commented on June 9, 2024

That seems like an excellent approach. When faced with choices for json marshaling / unmarshaling, it's been an excellent user experience to simply swap out json.Unmarshal for jsoniter.Unmarshal for oj.Unmarshal.

from ojg.

ohler55 avatar ohler55 commented on June 9, 2024

I'm in the process of a struct Marshal speedup so I'll add that option at the same time. Look for it next week.

from ojg.

ohler55 avatar ohler55 commented on June 9, 2024

If you don't mind working off a development version I have a branch named "pointer" that has the change in it. While the API is compatible there are a number of speedups with marshalling structs. Added more options like MustParse.

from ojg.

raidancampbell avatar raidancampbell commented on June 9, 2024

I'm in absolutely no hurry here, for the time being I'm sticking with jsoniter's implementation. Some more pressing stuff came up in the meantime so I won't be free to test out the change for another week or two.

I appreciate the MustParse though, I'm looking forward to giving it a spin!

from ojg.

raidancampbell avatar raidancampbell commented on June 9, 2024

It's looking like the more pressing stuff is also bound by various JSON marshaling/unmarshalings. I see the pointer branch was merged into develop recently: is that good to play around with?

from ojg.

raidancampbell avatar raidancampbell commented on June 9, 2024

Confirmed type differences resolved, thanks for the prompt work! Unfortunately I found another unrelated discrepancy with the behavior of the standard library's json package and opened #54 for tracking

from ojg.

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.