For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | goccy's commentsregister

I develop a library goccy/go-yaml for manipulating YAML in Go. Go already has a major library github.com/go-yaml/yaml, but I wanted a new library for various reasons, so I decided to make it myself from scratch. This library is a major library among Japanese Gophers as well as github.com/go-yaml/yaml. It is used by many companies and OSS. However, I would like more people outside of Japan to use it.

Perhaps you're wondering why you need to use github.com/goccy/go-yaml instead of github.com/go-yaml/yaml. The reason is I wrote it in the README.

Of course, github.com/go-yaml/yaml is a great library. But in many cases I also believe that github.com/goccy/go-yaml will also help your development.

If you like it, please give it a try. And I would be grateful if you could give me feedback.

Finaly, This library is developed in my personal time. I develop many other OSSs, and depending on the development priority, I may not be able to immediately respond to feature requests. If you have a request for github.com/goccy/go-yaml, please consider sponsoring. I get new vitality thanks to the sponsors. I also strive to meet the needs of sponsors as much as possible.


I develop a library goccy/go-yaml for manipulating YAML in Go. Go already has a major library github.com/go-yaml/yaml, but I wanted a new library for various reasons, so I decided to make it myself from scratch.

This library is a major library among Japanese Gophers as well as github.com/go-yaml/yaml. It is used by many companies and OSS. However, I would like more people outside of Japan to use it.

Perhaps you're wondering why you need to use github.com/goccy/go-yaml instead of github.com/go-yaml/yaml. The reason is I wrote it in the README.

Of course, github.com/go-yaml/yaml is a great library. But in many cases I also believe that github.com/goccy/go-yaml will also help your development.

If you like it, please give it a try. And I would be grateful if you could give me feedback.

Finaly, This library is developed in my personal time. I develop many other OSSs, and depending on the development priority, I may not be able to immediately respond to feature requests. If you have a request for github.com/goccy/go-yaml, please consider sponsoring. I get new vitality thanks to the sponsors. I also strive to meet the needs of sponsors as much as possible.


I'm sorry. I'm a fan of this service, and when I introduced it in a my tweet ( https://twitter.com/goccy54/status/1370800229054779396?s=20 ) , it seems that many users have accessed it.


Thank you for your report. It's an interesting result. If you have code that can be reproduced, I will try to optimize it to be faster than easyjson.


Thank you for your nice feedback !


I fixed it ! Thanks !


Thank you so much !


I tried to compare it with simdjson-go, but the interface of this library is very different from other libraries and it was difficult to compare. However, I think simdjson-go has the best decoder performance.


Not according to this comparison https://github.com/ohler55/compare-go-json.


Thank you for your feedback! In fact, it's understandable to be scared because it uses a lot of uncommon techniques. By growing this project, I would like to be able to use advanced techniques with peace of mind.


I develop a super fast JSON library ( https://github.com/goccy/go-json ) . It is drop-in replacement of encoding/json.

This library is available by simply replacing the import statement. It's more compatible and much faster than json-iterator/go.

Please give me your feedback ! Thanks !


Hi mate,

very interesting library. Keep it up.

Improvement suggestion: While reading the README, the JSON library comparison [1] it's confusing, at least to me. It uses symbols like: ○, and △ which are not obvious. I would rather use "yes/no" or the classic check/x (unicode chars, HN does not support them here) if you want to use symbols. I don't know what "△" even means, so I cannot suggest an alternative.

Just my 2 cents.

[1]: https://github.com/goccy/go-json#json-library-comparison

Edit: This 2021 I have the objective to contribute more to OS projects. Is it OKay if I submit a PR with the change? Thanks!


Another suggestion in the chart: it isn't obvious which line is about your project because it doesnt list the `goccy/` part. I would add that and move it to the top, out it and the standard in bold.


Yes, Of course !! Welcome !!


How does it handle de-serializing to structs with interface members? With encoding/json and ffjson, I had to write some code to handle that myself and add a type-tag member to my struct, which wasn't a deal-breaker, but if I could avoid that, I would like that very much.


As a Non-Gopher, is the stdlib so slow?


I think it depends on the application. In many cases, encoding/json is fast enough and stable, but I think you can try to use a faster library if JSON encoding / decoding is performance critical on your application.


Or you could try something like Apache Arrow or Flexbuffers?


If you write off the "JSON", sure, there's a bajillion options. But that's not always possible or desirable. None of those bajillion options have the combination of support and mindshare that JSON has obtained, for better or worse.


We're talking differences of a thousandth of a millisecond (0.001ms) for most structs, but yes.

encoding/json from stdlib makes a lot of allocations (~30) due its use of reflection, which is notoriously slow.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You