8 ms·
FracturedJson
- gritzko 9mo agoI am a bit saddened by the fact people get obsessed by syntactic innovation or even less than that. Don't we have plenty of urgent problems around us?
- teruakohatu 9mo agoPeople have a problem and are trying to solve it. We are not all required, nor able, to solve whatever the world’s most urgent problem is today. In this case they are formatting JSON in an easier to read way. It’s not an alternative to CRDT, it is a totally different issue.
- gritzko 9mo agoWhat can I say. I want all problems in my life to be like that.
- deleted 9mo ago[deleted]
- damnitbuilds 9mo agoNice. And BTW, thanks for supporting comments - the reason given for keeping comments out of standard Json is silly ( "they would be used for parsing directives" ).
- deleted 9mo ago[deleted]
- Xymist 9mo agoIt's a pretty sensible policy, really. Corollary to Hyrum's Law - do not permit your API to have any behaviours, useful or otherwise, which someone might depend on but which aren't part of your design goals. For programmers in particular, who are sodding munchkins and cannot be trusted not to do something clever but unintended just because it solves a problem for them, that means aggressively hamstringing everything. A flathead screwdriver should bend like rubber if someone tries to use it as a prybar.
- nodja 9mo agoOn one hand, it has made json more ubiquitous due to it's frozen state. On another hand, it forces everyone to move to something else and fragments progress. It would be much easier for people to move to json 2.0 rather than having hundreds of json + x standards. Everyone is just reinventing json with their own little twist that I feel sad that we haven't standardized to a single solution that doesn't go super crazy like xml. I don't disagree with the choice, but seeing how things turned out I can't just help but look at the greener grass on the other side.
- libria 9mo ago> A flathead screwdriver should bend like rubber if someone tries to use it as a prybar. Better not let me near your JSON files then. I pound in wall anchors with the bottom of my drill if my hammer is not within arms reach.
- mystifyingpoi 9mo ago> A flathead screwdriver should bend like rubber if someone tries to use it as a prybar. While I admire his design goals, people will just work around it in a pinch by adding a "comment" or "_comment" or "_comment_${random_uuid}", simply because they want to do the job they need. If your screwdriver bends like a rubber when prying, damn it, I'll just put a screw next to it, so it thinks it is used for driving screws and thus behaves correctly.
- pixl97 9mo agoAnd we wonder why people are calling for licensed professional software engineers.
- speed_spread 9mo agoJSON is used as config files and static resources all the time. These type of files really need comments. Preventing comments in JSON is punishing the wide majority to prevent a small minority from doing something stupid. But stupid gonna stupid, it's just condescending from Mister JSON to think he can do anything about it.
- 9mo ago
- patates 9mo agoXML people were doing crazy things in the Java/.NET world and "<!--[if IE 6]>" was still a thing in HTML when JSON was being designed. I also would have wanted comments, but I see why Crockford must have been skeptical. He just didn't want JSON to be the next XML.
- frizlab 9mo agoUnrelated: why spaces inside the parentheses? It’s not the first time I see this, but this is incorrect!
- cromulent 9mo agoJSON doesn't have parentheses, but it does have braces and brackets. The JSON spec specifically allows spaces. > Insignificant whitespace is allowed before or after any token.
- frizlab 9mo agoI was talking about the parent comment, which has spaces inside the parenthesis (I do prefer no spaces inside brackets and braces in my JSONs, but that’s another story).
- Sohcahtoa82 9mo agoProbably someone who writes C/C++ and formats their code that way if ( x == ( y + z ) * w ) { Personally, I find it hard to read.
- damnitbuilds 9mo agoAgreed. But I find this easier to read: if ( x == (y+z) * w ) { Spaces help group things.
- polshaw 9mo agoIs there an option for it to read the contents from a pipe? that's by far my biggest use for the jq app.
- tuetuopay 9mo agothis would be amazing to be chained with jq, that was my first thought as well.
- simonw 9mo agoThere's a C# CLI app in the repo: https://github.com/j-brooke/FracturedJson/blob/main/FracturedJsonCli/Cli.cs https://github.com/j-brooke/FracturedJson/blob/main/Fracture... Output is to standard out, or a file specified by the --outfile switch. Input is from either standard in, or from a file if using the --file switch It looks like both the JavaScript version and the new Python C# wrapper have equivalent CLI tools as well.
- staticshock 9mo agoI don't see a CLI tool in the Typescript repo.
- simonw 9mo agoHuh, you're right - could have sworn I saw one but I must have been mistaken.
- deleted 9mo ago[deleted]
- pimlottc 9mo agoYou can (usually) specify the input file name as “-“ (single hyphen) to read from stdin
- mlegendre 9mo agoOr you can use `/dev/stdin`, which has the upside of not needing tool support. I somewhat regularly use this on Linux. I think it also works on OS X
- barishnamazov 9mo agoThis is pretty cool, but I hope it isn't used for human-readable config files. TOML/YAML are better options for that. Git diff also can be tricky with realignment, etc. I can see potential usefulness of this is in debug mode APIs, where somehow comments are sent as well and are rendered nicely. Especially useful in game dev jsons.
- silvestrov 9mo agoJust say Norway to YAML.
- merelysounds 9mo agoThis is a reference to YAML parsing the two letter ISO country code for Norway: country: no As equivalent to a boolean falsy value: country: false It is a relatively common source of problems. One solution is to escape the value: country: “no” More context: https://www.bram.us/2022/01/11/yaml-the-norway-problem/ https://www.bram.us/2022/01/11/yaml-the-norway-problem/
- Y-bar 9mo agoWe stopped having this problem over ten years ago when spec 1.1 was implemented. Why are people still harking on about it?
- actionfromafar 9mo agoNow add brackets and end-tags, I'll reconsider. ;)
- Y-bar 9mo agoBrackets works fine: Roles: [editor, product_manager] End tags, that I’m not sure what that is. But three dashes is part of the spec to delineate sections: something: setting: true --- another: thing: false
- frizlab 9mo agoThis is interesting. I’d very much like to see a code formatter do that kind of thing; currently formatters are pretty much inflexible, which makes getting structure out of a formatted code sometimes hard.
- barishnamazov 9mo agoRight. In my previous work, I wrote a custom XML formatter for making it look table-like which was our use case. Of course, an ideal solution would have been to move away from XML, but can't run away from legacy.
- thechao 9mo agoI just built a C++ formatter that does this (owned by my employee, unfortunately). There's really only two formatting objects: tab-aligned tables, and single line rows. Both objects also support a right-floating column/tab aligned "//" comment. Both objects desugar to a sequence of segments (lines). The result is that you can freely mix expression/assignment blocks & statements. Things like switch-case blocks & macro tables are suddenly trivial to format in 2d. Because comments are handled as right floating, all comments nicely align. I vibe coded the base layer in an hour. I'm using with autogenerated code, so output is manually coded based on my input. The tricky bit would be "discovering" tables & block. I'd jus use a combo of an LSP and direct observation of sequential statements.
- marxisttemp 9mo agoYou built it, but your employee owns it? That sounds highly unusual.
- magius18 9mo agoAll this work and there's no mention of YAML on the repository is kind of funny to me
- __MatrixMan__ 9mo agoThe trouble with yaml is that it's too hard to keep track of how indented something is if its parent is off the screen. I have to keep a t-square on my desk and hang it from the top of my monitor whenever this comes up. That, and the fact that it has enough bells and whistles to that there are yaml parser exploits out there.
- shiandow 9mo agoThis looks very readable. The one example I didn't like is the expanded one where it expanded all but 1 of the elements. I feel like that should be an all or norhing thing, but there's bound to be edge cases.
- londons_explore 9mo agoGreat. Now integrate this into every JSON library and tool so I get to see it's output more often
- tomtomtom777 9mo agoI think integration into jq would be both powerful and sufficient.
- hnlmorg 9mo agoPowerful but not sufficient. There’s plenty of us who don’t use jq for various reasons.
- jcims 9mo agoLLMs have allowed me to start using jq for more than pretty printing JSON.
- ruuda 9mo agoGive https://rcl-lang.org/#intuitive-json-queries https://rcl-lang.org/#intuitive-json-queries a try! It can fill a similar role, but the syntax is very similar to Python/TypeScript/Rust, so you don’t need an LLM to write the query for you.
- jcims 9mo agoNice! Thanks!
- hnlmorg 9mo agoThe issue isn’t jq’s syntax. It’s that I already use other tools that fill that niche and have done since as long as jq has been a thing. And frankly, I personally believe the other tools are superior so I don’t want to fallback to jq just because someone on HN tells me to.
- simonw 9mo agoIt looks like there are two maintained implementations of this at the moment - one in C# https://github.com/j-brooke/FracturedJson/wiki/.NET-Library https://github.com/j-brooke/FracturedJson/wiki/.NET-Library and another in TypeScript/JavaScript https://github.com/j-brooke/FracturedJsonJs https://github.com/j-brooke/FracturedJsonJs. They each have their own test suite. There's an older pure Python version but it's no longer maintained - the author of that recently replaced it with a Python library wrapping the C# code. This looks to me like the perfect opportunity for a language-independent conformance suite - a set of tests defined as data files that can be shared across multiple implementations. This would not only guarantee that the existing C# and TypeScript implementations behaved exactly the same way, but would also make it much easier to build and then maintain more implementations across other languages. Interestingly the now-deprecated Python library does actually use a data-driven test suite in the kind of shape I'm describing: https://github.com/masaccio/compact-json/tree/main/tests/data https://github.com/masaccio/compact-json/tree/main/tests/dat... That new Python library is https://pypi.org/project/fractured-json/ https://pypi.org/project/fractured-json/ but it's a wrapper around the C# library and says "You must install a valid .NET runtime" - that makes it mostly a non-starter as a dependency for other Python projects because it breaks the ability to "pip install" them without a significant extra step.
- odyssey7 9mo agoThis is a good idea, though I don’t think it would guarantee program equivalence beyond the test cases.
- rafabulsing 9mo agoWell yeah, but then any discrepancies that are found can be discussed (to decide which of the behaviors is the expected one) and then added as a test for all existing and future implementations.
- simonw 9mo agoDepends on how comprehensive the test suite is. And OK it's not equivalent to a formal proof, but passing 1,000+ tests that cover every aspect of the specification is pretty close from a practical perspective, especially for a visual formatting tool.
- DJBunnies 9mo agoWhile I wish JSON formally supported comments, it seems more sensible (compatible) to just nest them inside of a keyed list or object as strings. { foo: "bar", ans: 42, comments: { ans: "Douglas Adams" } }
- Etheryte 9mo agoWorks right up until you get an entity where the field `comments` is suddenly relevant and then you need to go change everything everywhere. Much better to use the right tool for the job, if you want JSONC, be explicit and use JSONC.
- DJBunnies 9mo agoSurely it could be suffixed or keyed with a less likely collision target than this very simplistic example. I suppose JSONC and similar exist, although they are rarely used in the wild in contrast to actual JSON usage, compatibility is important.
- vunderba 9mo agoHadn't heard of JSONC, but I've always been a proponent of JSON5 for this reason. https://github.com/json5/json5 https://github.com/json5/json5
- ljm 9mo agoPersonally, I think if your JSON needs comments then it's probably for config or something the user is expected to edit themselves, and at that point you have better options than plain JSON and adding commentary to the actual payload. If it's purely for machine consumption then I suspect you might be describing a schema and there are also tools for that.
- NooneAtAll3 9mo agoidk... "ans: 42 // an old reference from DA API" seems easier to read than wasting 4 lines of yours multiply that for a long file... it takes a toll --- also sometimes one field contains a lot of separate data (because it's straight up easier to deserialize into a single std::vector and then do stuff) - so you need comments between data points
- kayhantolga 9mo agoThese JSON files are actually readable, congrats. I’m wondering whether this could be handled via an additional attached file instead. For example, I could have mycomplexdata.json and an accompanying mycomplexdata.jsonfranc. When the file is opened in the IDE, the IDE would merge the two automatically. That way, the original JSON file stays clean and isn’t polluted with extra data.
- zzo38computer 9mo ago> That way, the original JSON file stays clean and isn’t polluted with extra data. FracturedJson does not add any extra data; it only changes the formatting (it is a way of automatically formatting JSON data, not a new file format). However, the documentation mentions that in some cases it does reorder or rewrite things (such as the order of keys, the number of decimal places, etc). If you set CommentPolicy=TreatAsError then programs that convert it to a canonical form (whether or not that canonical form is JSON or some binary format intended to be like JSON) should (hopefully) result in the same output with the original and the one converted by FracturedJson, depending on what things are considered to be significant. (I tested this with a program I wrote, which converts JSON to DER (which is a canonical form (and, in my opinion, usually the only good one) of ASN.1), and does not consider the order of keys or the representation of numbers to be significant (although the conversion of numbers does not lose any precision and is converted exactly, but e.g. "1.2" is considered the same as "1.200" and "80e1" is considered the same as "800").)
- vitaelabitur 9mo agoI tokenized these and they seem to use around 20% less tokens than the original JSONs. Which makes me think a schema like this might optimize latency and costs in constrained LLM decoding. I know that LLMs are very familiar with JSON, and choosing uncommon schemas just to reduce tokens hurts semantic performance. But a schema that is sufficiently JSON-like probably won't disrupt model path/patterns that much and prevent unintended bias.
- nurumaik 9mo agoMinified json would use even less tokens
- vitaelabitur 9mo agoYeah, but I tried switching to minified JSON on a semantic labelling task and saw a ~5% accuracy drop. I suspect this happened because most of the pre-training corpus was pretty-printed JSON, and the LLM was forced to derail from likely path and also lost all "visual cues" of nesting depth. This might happen here too, but maybe to a lesser extent. Anyways, I'll stop building castles in the air now and try it sometime.
- memoriuaysj 9mo agoif you really care about structured output switch to XML. much better results, which is why all AI providers tend to use pseudo-xml in their system prompts and tool definitions
- kstenerud 9mo agoThis is great! The more human-readable, the better! I've also been working in the other direction, making JSON more machine-readable: https://github.com/kstenerud/bonjson/ https://github.com/kstenerud/bonjson/ It has EXACTLY the same capabilities and limitations as JSON, so it works as a drop-in replacement that's 35x faster for a machine to read and write. No extra types. No extra features. Anything JSON can do, it can do. Anything JSON can't do, it can't do.
- imiric 9mo agoThat's neat, but I'm much more intrigued by your Concise Encoding project[1]. I see that it only has a single Go reference implementation that hasn't been updated in 3 years. Is the project still relevant? Thanks for sharing your work! [1]: https://concise-encoding.org/ https://concise-encoding.org/
- kstenerud 9mo agoThanks! I'm actually having second thoughts with Concise Encoding. It's gotten very big with all the features it has, which makes it less likely to be adopted (people don't like new things). I've been toying around with a less ambitious format called ORB: https://github.com/kstenerud/orb https://github.com/kstenerud/orb It's essentially an extension of BONJSON (so it can read BONJSON documents natively) that adds extra types and features. I'm still trying to decide what types will actually be of use in the real world... CE's graph type is cool, but if nobody uses it...
- zzo38computer 9mo agoI use ASN.1X, so I use some types that those other formats do not have. Some of the types of ASN.1 are: unordered set, ISO 2022 string, object identifier, bit string. I added some additional types into ASN.1X, such as: TRON string, rational numbers, key/value list (with any types for keys and for values (and the types of keys do not necessarily have to match); for one thing, keys do not have to be Unicode), and reference to other nodes. However, ASN.1 (and ASN.1X) does not distinguish between qNaN and sNaN. I had also made up TER, which is a text format that can be converted to DER (like how ORT can be converted to ORB, although its working is differently, and is not compatible with JSON (TER somewhat resembles PostScript)). Your extensions of JSON with comments, hexadecimal notation, optional commas, etc is useful though (my own program to convert JSON to DER does treat commas as spaces, although that is an implementation detail).
- deleted 9mo ago[deleted]
- tracker1 9mo agoNice... I like using JSON to stdout for logging, this would be a nice formatting option when doing local dev to prettify it without full decomposition.
- __MatrixMan__ 9mo agoWhen I want something more readable than json I usually use nushell. The syntax is almost the same and you can just pipe through "from json" and "to json" to convert: https://gist.github.com/MatrixManAtYrService/9d25fddc15b2494e5ff8d0edb011418d https://gist.github.com/MatrixManAtYrService/9d25fddc15b2494... What I like about fractured json is the middle ground between too-sparse pretty printing, and too-compact non-pretty printing, nu doesn't give me that by default. One thing that neither fractured json nor nushell gives me, which I'd like, is the ability to associate an annotation with a particular datum, convert to json, convert back to the first language, and have that comment still be attached to that datum. Of course the intermediate json would need to have some extra fields to carry the annotations, which would be fine.
- deleted 9mo ago[deleted]
- whoamii 9mo agoLove the spirit, but the attack-plans example IMO looks worse with this formatting. I don’t love the horizontal scrolling through properties of an object.
- ramraj07 9mo agoI dont know if you spend a fraction of your life scrolling vertically through megabyte sizes json files, but if something can reduce the height of the file thats welcome. We dont need to read every single line fro left to right, we just need to quickly browse through the entire file. If a line in this format is longer than fits the screen, its likely we dont need to know whats in the cut off right corner anyway.
- whoamii 9mo agoGigabytes even (people do the silliest things). But ‘find’ gets me there 90% of the time, and at that point the amount of vertical scrolling isn’t really any different than in a 2kb file.
- ramraj07 9mo agoYour usecase is different then. Some of us actually want to browse through the entire json.
- miguelbemartin 9mo agoIs JSON a format that needs improvement for human readability? I think there are much better ways to present data to users, and JSON is a format that should be used to transfer data from system to system.
- CamouflagedKiwi 9mo agoI think yes? I fairly often find that I have something in JSON, which probably is from some system to system comms, and I'm trying to read it. Once it's not trivially small I often pipe it through jq or python -m json.tool or whatever, I like the idea of something that just does a better job of that.
- btown 9mo agoIf you're reaching for a tool like this, it's because you don't have a well-defined schema and corresponding dedicated visualization; you're looking at some arbitrary internal or insufficiently-documented transfer-level data with nested structure, perhaps in the midst of a debug breakpoint, and need a quick and concise visualization without the ability (or time) to add substantial code into the running runtime. Especially if you're working on integration code with third parties, it's common to come across this situation daily.
- setr 9mo agoIf you discard the human-readability component of it, JSON is an incredibly inefficient choice of encoding. Other than its ubiquity, you should only be using JSON because it’s both human and machine readable (and being human-readable is mainly valuable for debugging)
- zzo38computer 9mo agoI think JSON is not really so good either way, due to problems with the data and with the file format.
- andix 9mo agoLet's implement this formatting in all code editors and replace YAML with it :)
- CamouflagedKiwi 9mo agoI really like this, I think I'd find it useful fairly often and I like the idea of just making something that I use irregularly but not that rarely a bit better. But then I found it's in C#. And apparently the CLI app isn't even published any more (apparently nobody wanted it? Surprises me but ok). Anyway, I don't think I want this enough to install .NET to get it, so that's that. But I'd have liked a version in Go or Rust or whatever.
- fcoury 9mo agoI really liked the idea, so I am porting it to Rust https://github.com/fcoury/fracturedjson-rs https://github.com/fcoury/fracturedjson-rs
- neonsunset 9mo ago[dead]
- j-brooke 9mo agoI'm the maintainer of FracturedJson. The decision to stop publishing a binary for the CLI version was made a long time ago: fewer features, fewer users, less mature .NET tooling (as far as I knew). And as you say, .NET isn't a common language for distributing CLI tools. I plan to take a new look at that when I have the time. But a port to a more CLI-friendly platform could probably do a better job.
- kerblang 9mo agoI made a silly groovy script called "mommyjson" that doesn't try to preserve JSON formatting but just focuses on giving you the parentage (thus the name) including array indexes, object names, etc., all on the same line, so that when you find something, you know exactly where it is semantically. Not gonna claim that everybody should use it or that it cures insomnia cancer & hangnails, but feel free to borrow it: https://github.com/zaboople/bin/blob/master/mommyjson.groovy https://github.com/zaboople/bin/blob/master/mommyjson.groovy (btw I would happily upvote a python port, since groovy is not so popular)
- asa400 9mo agoThis is good! There are a number of these, so it seems like it's definitely somthing people want. The most popular of which I think is gron[0]. My own is jstream[1]. One tiny point of friendly feedback: you may want to consider adding an example usage/output so folks can see what it does literally. [0] - https://github.com/tomnomnom/gron https://github.com/tomnomnom/gron [1] - https://github.com/ckampfe/jstream https://github.com/ckampfe/jstream
- kerblang 8mo agoLate reply: Ah thanks Being a lazy slob, I never saw fit to make a dedicated repo (or even, directory) so I have no place for a readme. After all the whole thing fits in one script. Gron is a great name and the output looks pretty good... I like the idea of outputting perfectly valid javascript (with semicolons, even...) Let's see if HN will format this sample output from mommyjson right: employees: [199] profile: projects: [0] tasks: [0] description: Optimized grid-enabled parallelism employees: [199] profile: projects: [0] tasks: [0] taskId: T368 employees: [199] profile: projects: [0] tasks: [0] assignedTo: { employees: [199] profile: projects: [0] tasks: [0] assignedTo: id: E00200 employees: [199] profile: projects: [0] tasks: [0] assignedTo: name: Timothy Mullins employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: { employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: primary: C++ employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: experience: { employees: [199] profile: projects: [0] tasks: [0] assignedTo: skills: experience: years: 10
- NooneAtAll3 9mo agoI prefer JSON5
- kardianos 9mo agoI had a need to put all array data on single lines, but otherwise normal JSON: https://github.com/kardianos/json https://github.com/kardianos/json
- focom 9mo agoGreat stuff
- whoamii 9mo agoWhy reinvent the parser when the role of this library is formatting?
- jesse__ 9mo agoI love doing this type of formatting with source code. It'll be nice when people start writing linters that format code like this
- lifetimerubyist 9mo agoLinters shouldn’t format code.
- peterallport 9mo agoI could see FracturedJson being great for a browser extension or preview extension in IDE, as in just for _viewing_ JSON in a formatted way, not formatting the source.
- lifetimerubyist 9mo agoIf my json is too complicated to be readable I just use jq to find the things I want out of it.
- pmkary 9mo agoI have a JSON formatter called Virtuous (https://marketplace.visualstudio.com/items?itemName=karyfoundation.virtuous-vscode https://marketplace.visualstudio.com/items?itemName=karyfoun...) and till now I thought that is the best way to format JSON, and I most confess that I'll throw away my own formatter in favor of this one. What a great job.
- fcoury 9mo agoI ported it to Rust with a cli tool that allows you to format json in this format: https://github.com/fcoury/fracturedjson-rs https://github.com/fcoury/fracturedjson-rs https://crates.io/crates/fracturedjson https://crates.io/crates/fracturedjson And install with: cargo install fracturedjson > $ fjson --help Rust port of FracturedJsonJs: human-friendly JSON formatter with optional comment support. Usage: fjson [OPTIONS] [FILE]... Arguments: [FILE]... Input file(s). If not specified, reads from stdin Options: -o, --output <FILE> Output file. If not specified, writes to stdout -c, --compact Minify output (remove all whitespace) -w, --max-width <MAX_WIDTH> Maximum line length before wrapping [default: 120] -i, --indent <INDENT> Number of spaces per indentation level [default: 4] -t, --tabs Use tabs instead of spaces for indentation --eol <EOL> Line ending style [default: lf] [possible values: lf, crlf] --comments <COMMENTS> How to handle comments in input [default: error] [possible values: error, remove, preserve] --trailing-commas Allow trailing commas in input --preserve-blanks Preserve blank lines from input --number-align <NUMBER_ALIGN> Number alignment style in arrays [default: decimal] [possible values: left, right, decimal, normalize] --max-inline-complexity <MAX_INLINE_COMPLEXITY> Maximum nesting depth for inline formatting (-1 to disable) [default: 2] --max-table-complexity <MAX_TABLE_COMPLEXITY> Maximum nesting depth for table formatting (-1 to disable) [default: 2] --simple-bracket-padding Add padding inside brackets for simple arrays/objects --no-nested-bracket-padding Disable padding inside brackets for nested arrays/objects -h, --help Print help -V, --version Print version
- re 9mo agoPorts are a derivative work; you should preserve the original author's copyright attribution.
- deleted 9mo ago[deleted]
- andix 9mo agoI like this idea a lot. Currently the biggest issue for adoption seems to be the missing packages for most programming languages, and for homebrew/etc. It should even be possible to compile the dotnet library to a C-compatible shared library and provide packages for many other languages.
- Androcles 9mo agoThat is remarkable. I recently implemented this very functionality in Python using roughly 200 lines of code, completely unaware that a pre-built library was available.
- piskov 9mo agoThe lengths people go to (not) use the XML. It has everything: comments, validation, schema, what have you. Though, I guess, the only(?) great XML workflow is with C# LINQ
- strunz 9mo agoGenerally much larger for the same date and not readable unless using something that indents. Even then, I'd argue it's still less legible.
- rednafi 9mo agoHow many times do you actually need to look at large JSONs? The cost of readability is too high, IMO. Personally, I don't spend much time looking at complex JSON; a binary format like Protobuf along with a typed DSL is often what you need. You can still derive JSON from Proto if you need that. In return, you get faster transport and type safety. Also, on another note, tools like jq are so ubiquitous that any format that isn't directly supported by jq will have a really hard time seeing mass adoption.
- jedbrooke 9mo agoI had to do a double take on the repo author here :) this tool also looks super useful, I spend so much time at work looking at json logs that this will surely come in handy. It’s the kind of thing I didn’t even know I needed, but now that I saw it it makes perfect sense.
- j-brooke 8mo agoI created a show and tell post in the FracturedJson Github discussion area, "Ports, Wrappers, Plugins, and Tools". If you've made a port or want to see if it's available for some platform, come check it out. https://github.com/j-brooke/FracturedJson/discussions/52 https://github.com/j-brooke/FracturedJson/discussions/52