[{"data":1,"prerenderedAt":387},["ShallowReactive",2],{"project-17112747":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":42,"post_text":44,"what":45,"said":78,"maker_in_thread":178,"shape":182,"grid":187,"attempts":344,"same_week":350,"maker_shows":33,"maker_hidden":379,"reader_version":380,"card":381},"17112747","Gojay","Performant JSON encoder\u002Fdecoder for Golang","title","Show HN: Gojay – Performant JSON encoder\u002Fdecoder for Golang","https:\u002F\u002Fgithub.com\u002Ffrancoispqt\u002Fgojay","github.com","francoisllm",1526825332,2018,153,66,263,2155,13,"notable","languages","json library","library",[24,25,26,27],"golang json","json encoder","json decoder","go performance","mixed",-0.141,{"positive":31,"neutral":32,"mixed":33,"critical":34},3,8,1,6,18,{"performance":37,"design":39,"idea":41},{"positive":38,"critical":38},2,{"positive":40,"critical":31},0,{"positive":33,"critical":33},[33,40,40,40,40,40,31,40,40,33,33,40,40,40,40,40,40,40,31,33,40,31,40,40,33,31,43,31,31,33,40,40,40,43,40,40,40,40,40,43],5,null,{"problem":46,"audience":58,"pricing":44,"motivation":44,"time_to_build":44,"stack":69,"openness":76,"stage":77,"team_size":77},{"value":47,"source":48,"evidence":49},"Standard Go JSON encoding\u002Fdecoding is slow and allocation-heavy","commenter",[50,54],{"id":51,"by":52,"text":53},"17113190","tptacek","Performance is a real issue for Go's standard JSON, but this is a lot of extra boilerplate code to have to write (I'd probably codegen most of this if I had to), so I'd assume…",{"id":55,"by":56,"text":57},"17113708","dtolnay","To see how this fares against native code, I ported their benchmark to Rust's JSON library https:\u002F\u002Fserde.rs\u002F. Disclaimer: I am a maintainer of Serde. Numbers and graphs:…",{"value":59,"source":48,"evidence":60},"Go developers building high-throughput services",[61,65],{"id":62,"by":63,"text":64},"17114853","laumars","You don't have to use structs tags (nor even structs) to use encoding\u002Fjson. In fact I often don't as a lot of my usage is with maps rather than structs. I did some testing with…",{"id":66,"by":67,"text":68},"17113842","pquerna","(ffjson author here) The main feature that ffjson has that most of the non-stdlib JSON libraries is stdlib compatibility. Eg, the same struct-tags and interfaces used in stdlib…",[70],{"value":71,"source":72,"evidence":73},"Go","inferred",[74],{"id":75},"post","open_source","unknown",{"praise":79,"objections":100,"requests":119,"questions":134,"alternatives":146},[80,89],{"value":81,"source":48,"evidence":82},"Fast throughput for high-volume JSON processing",[83,87,88],{"id":84,"by":85,"text":86},"17113306","nieksand","You are right. I totally missed it in the first few tables. The lack of allocs for JsonParser was definitely a big win for my project. When processing at high rps (40k msg\u002Fsec),…",{"id":62,"by":63,"text":64},{"id":66,"by":67,"text":68},{"value":90,"source":91,"evidence":92},"Unicode handling works well for non-Latin text","maker",[93,96],{"id":94,"by":11,"text":95},"17113311","It's actually the next milestone, a generator for structs, maps and slices. Until now the goal was to make it ready for some high traffic services in production. These traffic…",{"id":97,"by":98,"text":99},"17170666","francoispqr","Nope, it's quite easy to integrate unicode parsing :) just need to check for \"\\u1234\" strings in JSON as it is valid, also need to check for utf16 surrogates. Standard package…",[101,111,115],{"value":102,"source":48,"evidence":103},"Requires writing struct marshal\u002Funmarshal functions by hand, not a drop-in replacement for encoding\u002Fjson",[104,107,110],{"id":105,"by":52,"text":106},"17113477","encoding\u002Fjson's Marshal and Unmarshall uses reflect and struct tags. This library doesn't: you have to define a function to make your struct satisfy an interface.",{"id":108,"by":52,"text":109},"17115191","That's fine, but this library isn't a drop-in replacement for encoding\u002Fjson; to be that, it has to work for people who expect tagged structs to round-trip through it, which won't…",{"id":51,"by":52,"text":53},{"value":112,"source":48,"evidence":113},"Speed gains smaller than published benchmarks in some tests",[114],{"id":62,"by":63,"text":64},{"value":116,"source":48,"evidence":117},"Slower than Rust serde in a cross-language benchmark",[118],{"id":55,"by":56,"text":57},[120,127],{"value":121,"source":91,"evidence":122},"A code generator for structs, maps and slices",[123,126],{"id":124,"by":11,"text":125},"17113294","The next milestone is actually to write a code generator for structs, maps and slices.",{"id":94,"by":11,"text":95},{"value":128,"source":48,"evidence":129},"Benchmarks covering real-world throughput",[130],{"id":131,"by":132,"text":133},"17113361","Twirrim","There's an important distinction between the decoding speed of documents and overall throughput. Wonder what can be done to realistically generate something approximating a real…",[135],{"value":136,"source":48,"evidence":137},"How does it compare to ffjson and go-codecgen?",[138,142],{"id":139,"by":140,"text":141},"17113675","krylon","I have been using ffjson[1] in a couple of private projects, which generates code to encode\u002Fdecode data, which supposedly is faster than the json library from Go's standard…",{"id":143,"by":144,"text":145},"17114746","segmondy","How does this compare to http:\u002F\u002Fugorji.net\u002Fblog\u002Fgo-codecgen ?",[147,153,158,167,174],{"value":148,"source":48,"evidence":149},"buger\u002Fjsonparser",[150],{"id":151,"by":85,"text":152},"17112976","The fastest Go JSON parser I know of is https:\u002F\u002Fgithub.com\u002Fbuger\u002Fjsonparser. I've used that one in production quite successfully. I don't see that in the comparative benchmarks…",{"value":154,"source":48,"evidence":155},"ffjson",[156,157],{"id":139,"by":140,"text":141},{"id":66,"by":67,"text":68},{"value":159,"source":48,"evidence":160},"go-codec \u002F codecgen",[161,164],{"id":162,"by":144,"text":163},"17114748","Is it? Kubernete switched from the native go Json parser to codec for performance increase. http:\u002F\u002Fugorji.net\u002Fblog\u002Fgo-codecgen",{"id":165,"by":144,"text":166},"17114754","That's exactly what go-codec does",{"value":168,"source":48,"evidence":169},"easyjson",[170],{"id":171,"by":172,"text":173},"17113195","BillinghamJ","Would be handy if it included a utility to generate the (un)marshaling functions, so that can just be done as a build step. So far we’ve used https:\u002F\u002Fgithub.com\u002Fmailru\u002Feasyjson…",{"value":175,"source":48,"evidence":176},"serde (Rust)",[177],{"id":55,"by":56,"text":57},{"comments":38,"answered":40,"key":179},[180,181],{"id":124,"text":125},{"id":94,"text":95},{"commenters":183,"max_depth":184,"maker_replies":38,"first_comment_mins":185,"lifespan_hours":186},36,10,47,183,[188,190,194,195,196,200,202,205,208,211,214,218,220,223,225,228,230,233,234,237,239,242,244,246,249,252,254,256,258,260,263,265,266,268,270,274,277,280,282,285,287,289,290,292,294,295,296,299,300,302,305,308,310,312,315,318,321,324,327,329,331,334,336,338,340,342],[151,40,33,189,85,40],"project\u002Fcritical\u002Fperformance",[191,40,40,192,193,40],"17113094","commenter\u002Fneutral\u002Fperformance","latch",[84,40,40,192,85,40],[131,40,40,192,132,40],[197,40,40,198,199,40],"17114541","commenter\u002Fneutral\u002Fnone","zerr",[201,40,40,198,85,40],"17114596",[203,40,40,198,204,40],"17114687","woolvalley",[206,40,40,207,85,40],"17114793","other\u002Fneutral\u002Fnone",[209,40,40,198,210,40],"17114171","abiox",[212,40,40,198,213,40],"17114580","conradfr",[215,40,31,216,217,40],"17113096","project\u002Fneutral\u002Fperformance","tomohawk",[162,40,40,219,144,40],"other\u002Fneutral\u002Fperformance",[221,40,40,198,222,40],"17114755","mintcrate",[224,40,40,192,85,40],"17115180",[226,40,40,198,227,40],"17115460","alex_dev",[51,33,33,229,52,40],"project\u002Fcritical\u002Fdesign",[231,33,31,232,63,40],"17113225","project\u002Fneutral\u002Fdesign",[105,33,33,229,52,40],[235,33,40,207,236,40],"17113546","phamilton",[238,33,40,207,52,40],"17113802",[240,33,40,207,241,40],"17113832","bpicolo",[243,33,40,207,52,40],"17114175",[245,33,40,207,236,40],"17113995",[247,33,40,207,248,40],"17114472","stcredzero",[250,33,40,207,251,40],"17114558","pcwalton",[253,33,40,207,248,40],"17115730",[255,33,40,207,236,40],"17115746",[257,33,40,207,236,40],"17115737",[259,33,40,207,251,40],"17114535",[261,33,40,207,262,40],"17114655","vorg",[62,33,31,264,63,40],"project\u002Fmixed\u002Fperformance",[108,33,33,229,52,40],[267,33,40,198,63,40],"17116352",[124,33,40,269,11,33],"maker\u002Fneutral\u002Fnone",[271,33,31,272,273,40],"17113651","project\u002Fneutral\u002Fidea","Rapzid",[275,33,40,207,276,40],"17113815","Vendan",[278,33,40,207,279,40],"17113504","logicallee",[281,33,40,207,276,40],"17113807",[283,33,40,198,284,40],"17113958","dullgiulio",[286,33,40,198,276,40],"17114063",[165,33,33,288,144,40],"project\u002Fcritical\u002Fidea",[139,38,31,216,140,40],[66,38,43,291,67,40],"project\u002Fpositive\u002Fperformance",[293,38,40,198,140,40],"17113877",[171,31,31,232,172,40],[94,31,40,269,11,33],[297,31,31,269,298,40],"17113719","anothergoogler",[97,31,31,269,98,40],[55,301,33,189,56,40],4,[303,301,40,207,304,40],"17113732","IshKebab",[306,301,40,207,307,40],"17114040","Groxx",[309,301,40,207,210,40],"17114135",[311,301,40,207,307,40],"17114496",[313,301,40,207,314,40],"17113776","akmittal",[316,301,40,207,317,40],"17114247","staticassertion",[319,43,43,320,63,40],"17113160","project\u002Fpositive\u002Fidea",[322,43,40,207,323,40],"17113373","agumonkey",[325,43,40,207,326,40],"17113730","zbentley",[328,43,40,207,63,40],"17114099",[330,43,40,207,63,40],"17114105",[332,34,40,198,333,40],"17112960","edhelas",[335,34,40,198,63,40],"17113108",[337,34,40,207,284,40],"17113973",[339,34,40,198,63,40],"17114285",[143,341,31,216,144,40],7,[343,341,43,291,98,40],"17170669",[345,349],{"id":346,"t":347,"points":348,"comments":31},"16928839",1524717612,11,{"id":4,"t":12,"points":14,"comments":15},[351,355,360,364,369,374],{"id":352,"name":353,"points":354,"category":20},"17126670","HyperApp",303,{"id":356,"name":357,"points":358,"category":359},"17093051","Cannoli",292,"dev_tools",{"id":361,"name":362,"points":363,"category":359},"17105373","Vuido",192,{"id":365,"name":366,"points":367,"category":368},"17091262","HackerForums.co",175,"consumer_social",{"id":370,"name":371,"points":372,"category":373},"17098620","Easy TensorFlow",157,"learning_science",{"id":375,"name":376,"points":377,"category":378},"17125754","Grayscale the Web",119,"productivity",false,"v2",{"id":382,"name":5,"line":6,"ai":379,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":383,"top":18,"kw":384,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":385,"url":9,"mix":386,"praise":81,"objection":102,"sub":21},17112747,-0.14,[24,25,26,27],"1000003001100000003103001353310005000005",[31,32,33,34],1794036566139]