Earlier quoted context omitted.
I 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.
Gigabytes 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.
FracturedJson
131–140 of 173 posts
Re: FracturedJson
#132Re: FracturedJson
#133I 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?
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.
Re: FracturedJson
#134This 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/ 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…
I am writing this because I work on a related topic https://replicated.wiki/blog/args.html
Re: FracturedJson
#135I 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?
People 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.
Re: FracturedJson
#136Earlier quoted context omitted.
This is very interesting, though the limitations for 'security' reasons seem somewhat surprising to me compared to the claim "Anything JSON can do, it can do. Anything JSON can't do, it can't do.". Simplest example, "a\u0000b" is a perfectly valid and in-bounds JSON string that valid JSON data sets may have in it. Doesn't it end up falling short of 'Anything JSON can do, it can do" to refuse to serialize that string?
"a\u0000b" ("a" followed by a vertical tabulation control code) is also a perfectly valid and in-bounds BONJSON string. What BONJSON rejects is any invalid UTF-8 sequences, which shouldn't even be present in the data to begin with.
Re: FracturedJson
#137Is there an option for it to read the contents from a pipe? that's by far my biggest use for the jq app.
There's a C# CLI app in the repo: 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.
Re: FracturedJson
#138Re: FracturedJson
#139Earlier quoted context omitted.
Can you tell me what was the context that lead you to create this? Unrelated JSON experience: I worked on a serializer which save/load json files as well as binary file (using a common interface). From my own use case I found JSON to be restrictive for no benefit (because I don't use it in a Javascript ecosystem) So I change the json format into something way more lax (optional comma, optional colon, optional quotes,…
Have you heard of EDN? It's mostly used in Clojure and ClojureScript, as it is to Clojure what JSON is to JS. If you need custom data types, you can use tagged elements, but that requires you to have functions registered to convert the data type to/from representable values (often strings). It natively supports quite a bit more than JSON does, without writing custom data readers/writers. https://github.com/edn-format…
I've found a more comprehensive documentation here. [1]
At first glance, I would say it's a bit more complex that it should for a "human readable" format.
Re: FracturedJson
#140Though, I guess, the only(?) great XML workflow is with C# LINQ