タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

golangとjsonに関するstefafafanのブックマーク (3)

  • Go言語で最速のJSONデコーダーを作った話

    はじめに こんにちは。Sugawara Yuutaです。今回は高校の休み時間に考え、空いた時間で作ったJSONデコーダーについて紹介したいと思います。 知ってる限りでは、汎用型受け入れ型をとっているデコーダー(つまり、標準パッケージと同じスタイルという意味です)の中では最速です。 モチベーション Go言語で開発を始めて、(Go言語のコミュニティーのスタイルがJavaScriptなどと比べるとなんでも標準ライブラリでやってしまうようなのにも関わらず)サードパーティー製のJSONデコーダーが多く作られていることに驚きました。 しかし、大規模なものから小規模なものまで試してみて、それぞれが必ずしも共通しているとは限らない、たくさんの問題を持っていることに気づきました。それについては下のセクションで詳しく取り上げます。 今までのJSONデコーダーが持つ問題 具体的なライブラリの名前は出さないでおき

    Go言語で最速のJSONデコーダーを作った話
  • GitHub - bytedance/sonic: A blazingly fast JSON serializing & deserializing library

    goversion: 1.17.1 goos: darwin goarch: amd64 cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz BenchmarkEncoder_Generic_Sonic-16 32393 ns/op 402.40 MB/s 11965 B/op 4 allocs/op BenchmarkEncoder_Generic_Sonic_Fast-16 21668 ns/op 601.57 MB/s 10940 B/op 4 allocs/op BenchmarkEncoder_Generic_JsonIter-16 42168 ns/op 309.12 MB/s 14345 B/op 115 allocs/op BenchmarkEncoder_Generic_GoJson-16 65189 ns/op 199.96 MB

    GitHub - bytedance/sonic: A blazingly fast JSON serializing & deserializing library
  • JSON-to-Go: Convert JSON to Go instantly

    This tool instantly converts JSON into a Go type definition. Paste a JSON structure on the left and the equivalent Go type will be generated to the right, which you can paste into your program. The script has to make some assumptions, so double-check the output! For an example, try converting JSON from the SmartyStreets API or the GitHub API. © 2015 Matt Holt (@mholt6) • View on GitHub • Dark mode

    JSON-to-Go: Convert JSON to Go instantly
  • 1