News for hackers. Stuff that matters.
Re:Browsers, JSON, and FormData by lyptt on Saturday November 12, 2022 @09:14AM (#33573214)
See also: https://news.ycombinator.com/item?id=8664671

Looks like supporting an enctype of application/json was proposed, but never went anywhere.

Re:Browsers, JSON, and FormData by Timwi on Saturday November 12, 2022 @12:15PM (#33574984)
As someone who doesn't follow the standardization process, I would love an explanation how proposals like this fail even when they have widespread support and no downsides. Is there an easy answer to this or is it different from case to case?
Re:Browsers, JSON, and FormData by lyptt on Saturday November 12, 2022 @12:37PM (#33575212)
From what I've seen, standards need to be picked up by browser vendors for them to become established.

Usually one vendor will implement it behind a flag, and if it gains traction then other vendors will follow suit before it becomes a generally available feature.

Re:Browsers, JSON, and FormData by mjepronk on Saturday November 12, 2022 @01:59PM (#33575928)
Personally, I don't like the use of indexing to determine the JSON structure (like this `<input name="foo[0][1]">`). I think it's way more powerful to derive the JSON structure from the DOM tree. That's why I wrote some code to do exactly that: https://gist.github.com/mjepronk/5b33eaa90ecf11a5c2c47935a2c...

The use of `<fieldset>` and `<section>` may not be the best choice. You could use `data-` attributes on arbitrary tags for instance.