[{"data":1,"prerenderedAt":534},["ShallowReactive",2],{"project-20245913":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":34,"aspects":35,"strip":42,"post_text":45,"what":46,"said":60,"maker_in_thread":144,"shape":150,"grid":155,"attempts":495,"same_week":496,"maker_shows":43,"maker_hidden":526,"reader_version":527,"card":528},"20245913","Catj","A new way to display JSON files","title","Show HN: Catj – A new way to display JSON files","https:\u002F\u002Fgithub.com\u002Fsoheilpro\u002Fcatj","github.com","soheilpro",1561147810,2019,388,120,62,2195,3,"legend","dev_tools","json cli viewer","cli",[24,25,26,27],"json","jq","flatten json","json paths","debated",-0.029,{"positive":31,"neutral":32,"mixed":33,"critical":31},10,14,1,35,{"execution":36,"idea":38,"design":41},{"positive":37,"critical":33},0,{"positive":39,"critical":40},9,6,{"positive":37,"critical":18},[37,37,37,37,37,37,37,37,33,18,37,37,37,37,37,37,37,37,37,18,43,18,33,37,18,33,18,18,18,43,43,43,43,33,43,44,33,37,37,37],5,2,null,{"problem":47,"audience":45,"pricing":45,"motivation":54,"time_to_build":45,"stack":58,"openness":59,"stage":59,"team_size":59},{"value":48,"source":49,"evidence":50},"Hard to see the structure of deeply nested JSON and find paths for jq.","maker",[51],{"id":52,"by":11,"text":53},"20246317","Author here. I use it all the time when working with jq [1] to find the path of the nodes that I want to select or filter. It also makes it much easier to understand the…",{"value":55,"source":49,"evidence":56},"Finding jq paths and understanding nested JSON structure.",[57],{"id":52,"by":11,"text":53},[],"unknown",{"praise":61,"objections":78,"requests":105,"questions":113,"alternatives":121},[62],{"value":63,"source":64,"evidence":65},"Useful for exploring JSON; clever flattening idea.","commenter",[66,70,74],{"id":67,"by":68,"text":69},"20249569","blablabla123","That's really smart, in fact this was - maybe until now - the only reason for me to resort to csv. (With pandas it's by the way really easy to flatten jsons into csv) JSON is…",{"id":71,"by":72,"text":73},"20246904","etaioinshrdlu","It looks almost executable! If it were, that might be handy now and then.",{"id":75,"by":76,"text":77},"20249206","htk","What a simple and clever idea. I would love something like that for XML in C#.",[79,90],{"value":80,"source":64,"evidence":81},"The flat format is hard to read for large files and loses editor nesting help.",[82,86],{"id":83,"by":84,"text":85},"20249203","bborud","Oh no. This looks like the horrible config format a colleague of mine invented at Yahoo when making an absolutely horrific config system. This brings back bad memories. This may…",{"id":87,"by":88,"text":89},"20249935","QuadrupleA","Please don't write JSON like the example - it's like putting 4 files in a hierarchy of 20 folders. Way over-structured. That said, if you're stuck dealing with bad JSON like this…",{"value":91,"source":64,"evidence":92},"jq can already do this.",[93,97,101],{"id":94,"by":95,"text":96},"20246727","jolmg","I was curious if this could be doable with jq, and apparently it is: ``` jq -j ' [ [ paths(scalars) | map( if type == \"number\" then \"[\" + tostring + \"]\" else \".\" + . end ) |…",{"id":98,"by":99,"text":100},"20246966","flying_sheep","https:\u002F\u002Fgithub.com\u002Fstedolan\u002Fjq\u002Fissues\u002F243 jq can also do the same thing, with more flexibility. And it is possible to combine with bash alias to make it indistinguishable from catj",{"id":102,"by":103,"text":104},"20247524","hasahmed","cat foo.json | jq .",[106],{"value":107,"source":64,"evidence":108},"Option to disable colored output for piping.",[109],{"id":110,"by":111,"text":112},"20246865","matmann2001","I would recommend an optional flag to disable the output coloring, in the case where someone wants to pipe this to a file or other program.",[114],{"value":115,"source":64,"evidence":116},"What is the use case?",[117],{"id":118,"by":119,"text":120},"20246195","BaconJuice","Just curious, what would be the use case for something like this?",[122,126,137],{"value":25,"source":64,"evidence":123},[124,125],{"id":94,"by":95,"text":96},{"id":98,"by":99,"text":100},{"value":127,"source":64,"evidence":128},"gron",[129,133],{"id":130,"by":131,"text":132},"20246266","avidal","Have you seen gron[0]? It's similar: flattens JSON documents to make them easily greppable. But it also can revert (ie, ungron) so you can pipe json to gron, grep -v to remove…",{"id":134,"by":135,"text":136},"20249020","venthur","Looks a lot like ye olde gron: https:\u002F\u002Fgithub.com\u002Ftomnomnom\u002Fgron Here's a Python implementation of gron https:\u002F\u002Fgithub.com\u002Fventhur\u002Fpython-gron",{"value":138,"source":64,"evidence":139},"flatjson",[140],{"id":141,"by":142,"text":143},"20246876","twp","I wrote a similar tool: https:\u002F\u002Fgithub.com\u002Ftwpayne\u002Fflatjson The flat format is great for diffs: ``` --- testdata\u002Fa.json +++ testdata\u002Fb.json @@ -1,5 +1,6 @@ root = {}; root.menu =…",{"comments":44,"answered":33,"key":145},[146,149],{"id":147,"text":148},"20248493","That's awesome work. The only problem is that it does not properly handle keys which are not valid JS identifiers (like 1foo, @foo, foo-bar, etc.).",{"id":52,"text":53},{"commenters":151,"max_depth":152,"maker_replies":44,"first_comment_mins":153,"lifespan_hours":154},85,7,36,195,[156,158,162,166,168,171,173,175,178,181,183,187,189,192,195,197,200,203,206,209,212,215,217,220,221,223,225,229,231,235,238,240,242,243,246,249,252,255,258,261,264,267,269,272,274,276,278,280,283,286,289,292,295,297,299,301,305,306,310,314,316,319,323,325,328,332,335,338,343,346,350,352,355,357,360,364,367,369,371,373,375,377,380,384,386,390,392,394,398,402,406,408,411,415,417,420,423,425,429,431,435,439,443,445,449,453,457,462,463,466,470,473,475,477,480,483,485,488,490,493],[94,37,37,157,95,37],"other\u002Fneutral\u002Fnone",[159,37,37,160,161,37],"20246868","commenter\u002Fpositive\u002Fnone","pstuart",[163,37,37,164,165,37],"20246889","commenter\u002Fneutral\u002Fnone","phiresky",[167,37,37,164,95,37],"20246957",[169,37,37,164,170,37],"20247614","hyperpallium",[172,37,37,160,95,37],"20248300",[174,37,37,164,170,37],"20250054",[176,37,37,160,177,37],"20250460","sdegutis",[179,37,37,164,180,37],"20250808","cmonnow",[182,37,37,164,170,37],"20253363",[184,37,37,185,186,37],"20257282","commenter\u002Fneutral\u002Fperformance","sethish",[188,37,37,164,95,37],"20264654",[190,37,37,164,191,37],"20315495","facorreia",[193,37,37,160,194,37],"20247096","etxm",[196,37,37,164,95,37],"20247488",[198,37,37,160,199,37],"20247796","krick",[201,37,37,160,202,37],"20250846","geezerjay",[204,37,37,164,205,37],"20247615","snek",[207,37,37,164,208,37],"20247964","emmelaich",[210,37,37,164,211,37],"20248125","eridius",[213,37,37,164,214,37],"20248609","Splognosticus",[216,37,37,164,211,37],"20252479",[218,37,37,164,219,37],"20247991","TheDong",[147,37,37,164,11,33],[222,37,37,164,95,37],"20249609",[224,37,37,164,95,37],"20251023",[226,37,33,227,228,37],"20248895","project\u002Fcritical\u002Fexecution","kfrzcode",[230,37,37,164,95,37],"20250114",[232,37,18,233,234,37],"20252350","project\u002Fneutral\u002Fexecution","waveforms",[236,37,37,164,237,37],"20267789","alinspired",[239,37,37,164,95,37],"20270227",[241,37,37,157,237,37],"20266425",[130,33,37,157,131,37],[244,33,37,157,245,37],"20246309","Fnoord",[247,33,37,157,248,37],"20247462","heyoni",[250,33,37,164,251,37],"20247861","edflsafoiewq",[253,33,37,164,254,37],"20249170","sethammons",[256,33,37,157,257,37],"20248059","Apaec",[259,33,37,157,260,37],"20246536","inferiorhuman",[262,33,37,157,263,37],"20246622","webo",[265,33,37,157,266,37],"20246647","lucb1e",[268,33,37,157,161,37],"20246878",[270,33,37,157,271,37],"20246670","pfranz",[273,33,37,157,95,37],"20247064",[275,33,37,157,271,37],"20248347",[277,33,37,157,95,37],"20248368",[279,33,37,157,271,37],"20253399",[281,33,37,157,282,37],"20247777","ori_b",[284,33,37,157,285,37],"20248378","ElegantGiraffe",[287,33,37,157,288,37],"20253639","dirkt",[290,33,37,157,291,37],"20258172","nerdponx",[293,33,37,157,294,37],"20246785","wooby",[296,33,37,157,199,37],"20247828",[298,33,37,157,95,37],"20250260",[300,33,37,157,199,37],"20250467",[302,33,37,303,304,37],"20248056","other\u002Fpositive\u002Fnone","news_hacker",[141,44,37,157,142,37],[307,18,18,308,309,37],"20249007","project\u002Fneutral\u002Fidea","chrismorgan",[311,312,37,157,313,37],"20248618",4,"yason",[315,43,37,157,208,37],"20247941",[317,40,37,157,318,37],"20246729","tedivm",[320,40,43,321,322,37],"20246923","project\u002Fpositive\u002Fidea","ficklepickle",[324,40,37,164,318,37],"20251004",[326,40,37,157,327,37],"20311062","mkesper",[329,40,18,330,331,37],"20247261","project\u002Fneutral\u002Fdesign","rahimnathwani",[333,152,18,308,334,37],"20248602","hokus",[336,152,37,164,337,37],"20250328","geofft",[339,340,33,341,342,37],"20247638",8,"project\u002Fcritical\u002Fidea","kara_jade",[344,340,37,164,345,37],"20248286","ComputerGuru",[347,39,37,348,349,37],"20246319","other\u002Fneutral\u002Fidea","nfoz",[351,39,37,164,208,37],"20247995",[353,39,37,157,354,37],"20248514","mirimir",[356,39,37,157,337,37],"20250371",[358,31,18,233,359,37],"20249938","limsup",[361,362,18,308,363,37],"20248848",11,"ravinizme",[83,365,33,366,84,37],12,"project\u002Fcritical\u002Fdesign",[368,365,37,164,337,37],"20250334",[98,370,33,341,99,37],13,[372,370,37,164,95,37],"20247088",[374,370,37,157,214,37],"20248615",[376,32,18,308,177,37],"20246478",[87,378,18,379,88,37],15,"project\u002Fmixed\u002Fdesign",[381,382,18,308,383,37],"20248201",16,"danschumann",[385,382,37,157,345,37],"20248282",[387,388,18,308,389,37],"20248099",17,"not_kurt_godel",[67,391,43,321,68,37],18,[134,393,33,341,135,37],19,[395,396,18,330,397,37],"20246544",20,"krapp",[399,396,37,400,401,37],"20246648","commenter\u002Fneutral\u002Fdesign","ucarion",[403,404,43,321,405,37],"20282434",21,"deostroll",[71,407,43,321,72,37],22,[409,407,37,164,410,37],"20246948","rolltiide",[412,413,18,308,414,37],"20246744",23,"konsumer",[118,416,18,308,119,37],24,[418,416,43,321,419,37],"20246209","ofxartem",[421,416,43,321,422,37],"20246244","z3t4",[52,416,37,424,11,33],"maker\u002Fneutral\u002Fidea",[426,427,43,321,428,37],"20248588",25,"fareesh",[110,430,18,330,111,37],26,[432,433,18,308,434,37],"20247653",27,"jay-anderson",[436,437,37,157,438,37],"20254172",28,"nailer",[440,441,33,366,442,37],"20246752",29,"karxxm",[75,444,43,321,76,37],30,[446,447,43,321,448,37],"20248038",31,"stdcall83",[450,451,37,157,452,37],"20247428",32,"laurent123456",[454,455,33,341,456,37],"20247864",33,"jijji",[458,459,43,460,461,37],"20248431",34,"project\u002Fpositive\u002Fnone","usamaejaz",[102,34,33,341,103,37],[464,153,33,341,465,37],"20246470","dymk",[467,468,33,366,469,37],"20246316",37,"enriquto",[471,468,37,164,472,37],"20246701","gridlockd",[474,468,37,164,469,37],"20246762",[476,468,37,164,397,37],"20246790",[478,468,37,164,479,37],"20248311","brennebeck",[481,468,37,157,482,37],"20247253","imtringued",[484,468,37,157,472,37],"20249313",[486,468,37,164,487,37],"20246854","Sohcahtoa82",[489,468,37,164,469,37],"20247017",[491,468,37,164,492,37],"20250665","derrikcurran",[494,468,37,164,469,37],"20251805",[],[497,502,507,512,517,521],{"id":498,"name":499,"points":500,"category":501},"20252097","noageismintech.com",523,"web_saas",{"id":503,"name":504,"points":505,"category":506},"20233376","collectoral.com",143,"productivity",{"id":508,"name":509,"points":510,"category":511},"20231328","The Star Maps",138,"creative",{"id":513,"name":514,"points":515,"category":516},"20247661","Fist",124,"data",{"id":518,"name":519,"points":520,"category":511},"20267629","Ludigraphix",106,{"id":522,"name":523,"points":524,"category":525},"20251015","Gravitle",95,"languages",false,"v2",{"id":529,"name":5,"line":6,"ai":526,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":530,"top":18,"kw":531,"maker":11,"domain":10,"tier":19,"attempts":37,"strip":532,"url":9,"mix":533,"praise":63,"objection":80,"sub":21},20245913,-0.03,[24,25,26,27],"0000000013000000000353103133355551521000",[31,32,33,31],1794036578554]