Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 31, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 31, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 31, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 31, 2025

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025

      Xbox Game Pass just had its strongest content quarter ever, but can we expect this level of quality forever?

      May 31, 2025

      Gaming on a dual-screen laptop? I tried it with Lenovo’s new Yoga Book 9i for 2025 — Here’s what happened

      May 31, 2025

      We got Markdown in Notepad before GTA VI

      May 31, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Oracle Fusion new Product Management Landing Page and AI (25B)

      May 31, 2025
      Recent

      Oracle Fusion new Product Management Landing Page and AI (25B)

      May 31, 2025

      Filament Is Now Running Natively on Mobile

      May 31, 2025

      How Remix is shaking things up

      May 30, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025
      Recent

      How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

      May 31, 2025

      Xbox Game Pass just had its strongest content quarter ever, but can we expect this level of quality forever?

      May 31, 2025

      Gaming on a dual-screen laptop? I tried it with Lenovo’s new Yoga Book 9i for 2025 — Here’s what happened

      May 31, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Does This Spec Turn You On?

    CodeSOD: Does This Spec Turn You On?

    January 30, 2025

    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.

    [Advertisement]
    Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleFOSS Weekly #25.05: LibreOffice Tip, Launcher Customization, Moving Away from Google and More
    Next Article Armbian – Linux for ARM development boards

    Related Posts

    News & Updates

    How to install SteamOS on ROG Ally and Legion Go Windows gaming handhelds

    May 31, 2025
    News & Updates

    Xbox Game Pass just had its strongest content quarter ever, but can we expect this level of quality forever?

    May 31, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Multi-Task Learning with Regression and Classification Tasks: MTLComb

    Development

    The tiniest Raspberry Pi – the $5 Pico 2 – gets a big performance boost

    Development

    This is the Coolest Raspberry Pi 5 Accessory I have Ever Used

    Development

    NetApp SnapCenter Flaw Could Let Users Gain Remote Admin Access on Plug-In Systems

    Development

    Highlights

    Website Design Examples for Inspiration on Websitevice

    November 16, 2024

    Post Content Source: Read More 

    Best Steam Deck and ROG Ally deals during Amazon Prime Day: Get gaming handhelds at a discount

    July 3, 2024

    Europol Expert Platform Data Breach Claimed by Hacker IntelBroker

    July 9, 2024

    Comprehensive LLM Software Testing Guide

    July 26, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.