タグ

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

タグの絞り込みを解除

jsonに関するstefafafanのブックマーク (5)

  • 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 Hero - A beautiful JSON viewer

    JSON sucks.But we're making it better.Stop staring at thousand line JSON files in your editor and start staring at thousand line JSON files in the world's best JSON viewer. With a few nice features to help make it not the worst.

    JSON Hero - A beautiful JSON viewer
  • 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
  • JSONをいい感じに見るCLIを作った

    その他 OS の方は GitHub のrelease ページから DL することができます。 使い方 tv はミニマムな CLI として作ったのでテーブル表示の機能とそれに付随したオプションのみを提供しています。 配列になっている JSON をテーブル表示する キーを指定することでそのキーを使ってソートできる いくつかのスタイルでテーブルを表示できる 以上が主の機能です。 Table 表示 ユースケースとして JSON が帰ってくる API を想定します。 API の例として jsonplaceholder を利用します。 今回は https://jsonplaceholder.typicode.com/users を使います。 この API は以下のようなデータが返ってきます。 $ curl -s https://jsonplaceholder.typicode.com/users [

    JSONをいい感じに見るCLIを作った
    stefafafan
    stefafafan 2021/09/06
    jqあるじゃんと思って開いたら全然違くてよかった
  • 1