Show HN: OpenWrt Configurator – Simple config management for OpenWrt devices(github.com/jasrusable) OpenWrt Configurator is a CLI tool and corresponding JSON config file which lets you specify the entire state of your network including UCI configuration, packages and firmware versions in a single UCI-like JSON config file which can be provisioned to your OpenWrt devices using OpenWrt Configurator.
Why does JSON have commas?(simonsafar.com) As it happens, I already wrote a post on why Commas are Bad. We did not arrive at any specific conclusion apart from commas maybe being worth rethinking and replacing with some other things.
Fast columnar JSON decoding with arrow-rs(arroyo.dev) JSON is the most common serialization format used in streaming pipelines, so it pays to be able to deserialize it fast. This post covers in detail how the arrow-json library works to perform very efficient columnar JSON decoding, and the additions we've made for streaming use cases.
Decoding JSON sum types in Go without panicking(nicolashery.com) The Go programming language doesn't have native support for sum types, but we'll see how we can emulate them, how to decode and encode them into JSON, and how in some cases they can help avoid runtime panic exceptions.
Matching Regexps 200 Times Faster(eregon.me) You might have seen @byroot’s excellent blog post series on optimizing the json gem. From the first blog post it’s clear most of the time for generating JSON is spent in generate_json_string() and specifically in convert_UTF8_to_JSON(), i.e., in converting Ruby Strings to JSON Strings.
Abusing C to implement JSON parsing with struct methods(xnacly.me) Build a JSON parser in cInstead of using by itself functions: attach functions to a struct and use these as methodsmake it C issue family free (segfaults, leaks, stack overflows, etc…)provide an ergonomic API
Parsing JSON in 500 lines of Rust(krish.gg) Last semester at university, I took a course called "Syntax-Based Tools and Compilers". It focused on building a scanner, parser, compiler, and so on for a language called PL0. We used Python in the course, but I was really interested in learning Rust at the time.
116 points by KrishKrish 79 days ago | 57 comments
How (not) to sign a JSON object (2019)(latacora.com) Last year we did a blog post on interservice auth. This post is mostly about authenticating consumers to an API. That’s a related but subtly different problem: you can probably impose more requirements on your internal users than your customers. The idea is the same though: you’re trying to differentiate between a legitimate user and an attacker, usually by getting the legitimate user to prove that they know a credential that the attacker doesn’t.
Optimizing Ruby's JSON, Part 7(byroot.github.io) In the previous post, we started covering some parser optimizations.
There’s just a handful more to cover until we reached what’s the state of the currently released version of ruby/json.
Optimizing Ruby's JSON, Part 5(byroot.github.io) In the previous post, we showed how we eliminated two malloc/free pairs of calls when generating small JSON documents, and how that put us ahead of Oj when reusing the JSON::State object.
Optimizing Ruby's JSON, Part 4(byroot.github.io) In the previous post, we established that as long as ruby/json wasn’t competitive on micro-benchmarks, public perception wouldn’t change. Since what made ruby/json appear so bad on micro-benchmarks was its setup cost, we had to find ways to reduce it further.
Optimizing Ruby's JSON, Part 1(byroot.github.io) I was recently made maintainer of the json gem, and aside from fixing some old bugs, I focused quite a bit on its performance, so that it is now the fastest JSON parser and generator for Ruby on most benchmarks.
271 points by todsacerdoti 142 days ago | 62 comments
Nobody gets fired for picking JSON, but maybe they should?(mcyoung.xyz) JSON is extremely popular but deeply flawed. This article discusses the details of JSON’s design, how it’s used (and misused), and how seemingly helpful “human readability” features cause headaches instead. Crucially, you rarely find JSON-based tools (except dedicated tools like jq) that can safely handle arbitrary JSON documents without a schema—common corner cases can lead to data corruption!
44 points by maximilianburke 149 days ago | 57 comments
Nobody Gets Fired for Picking JSON, but Maybe They Should?(mcyoung.xyz) JSON is extremely popular but deeply flawed. This article discusses the details of JSON’s design, how it’s used (and misused), and how seemingly helpful “human readability” features cause headaches instead. Crucially, you rarely find JSON-based tools (except dedicated tools like jq) that can safely handle arbitrary JSON documents without a schema—common corner cases can lead to data corruption!
JSON5 – JSON for Humans(json5.org) JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). It is not intended to be used for machine-to-machine communication. (Keep using JSON or other file formats for that. 🙂)