Essex shoplifting gang stole nearly £150,000 worth of goods via shopping trolleys from Tesco
American Airlines CEO issues heartfelt message to family on tragic collision after plane carrying 64 and Black Hawk crashed in DC Airport
And now something fun for a change: Building blocks of life in Bennu asteroid samples
Scientists analyzing samples from asteroid Bennu have found something remarkable: Despite being a cold, lifeless rubble pile that formed around 65 million years ago, it holds a rich inventory of organic molecules - key ingredients for life.…
Trump signs an executive order to end racial and gender 'indoctrination' in schools
Trump gifts Elon Musk the Lincoln Bedroom at the White House after turning DOGE office into sleeping quarters
David and Victoria Beckham 'attend former Man United star's 50th birthday party' - leaving 'after a security guard was head-butted' as police probe
Chilling cries of father who was brutally strangled to death in his own garden by murderer after row at the pub as his killer is jailed for 18 years
Taxpayers fund new clothes and shoes for Channel crossing migrants worth £3,000 every day - and total £4m in three years, figures show
Warning as mum dies after suffering reaction to common hospital test - could YOU be at risk?
The violent gang members and child predators heading home as ICE collects over 1,000 illegal migrants in a day
Terrifying EarthCam video captures moment American Airlines flight collides with military Black Hawk helicopter over Washington DC
Meghan Markle sparks debate after fans spot she may have altered engagement ring for a FOURTH time
Astronomers Discover 196-Foot Asteroid With 1-In-83 Chance of Hitting Earth In 2032
Read more of this story at Slashdot.
Tom Selleck's lonely 80th birthday lunch for one at fast food drive-thru
MP hits out at Government 'incompetence' after huge Essex Police cuts announced
CodeSOD: Does This Spec Turn You On?
I'm a JSON curmudgeon, in that I think that its type-system, inherited from JavaScript, is bad. It's a limited vocabulary of types, and it forces developers to play odd games of convention. For example, because it lacks any sort of date type, you either have to explode your date out as a sub-dictionary (arguably, the "right" approach) or do what most people do- use an ISO formatted string as your date. The latter version requires you to attempt to parse the sting to validate the data, but validating JSON is a whole thing anyway.
But, enough about me being old and cranky. Do you know one type JSON supports? Boolean values.
Which is why this specification from today's anonymous submitter annoys me so much:
field: sw_auto_update type: string valid values: /(on)|(off)/ field: data_auto_update type: string valid values: /(on)|(off)/ field: spanning_tree_protocol type: string valid values: /(on)|(off)/Their custom validator absolutely requires the use of strings, and absolutely requires that they have these values. Sending a boolean, or worse, the string "true" causes the request to get rejected.
Our submitter doesn't explain why it's this way, but I have a strong suspicion that it's because it was originally designed to support a form submission with radio buttons. The form is long gone, but the API contract remains.