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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 1, 2025

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

      June 1, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 1, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 1, 2025

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025

      A week of hell with my Windows 11 PC really makes me appreciate the simplicity of Google’s Chromebook laptops

      June 1, 2025

      Elden Ring Nightreign Night Aspect: How to beat Heolstor the Nightlord, the final boss

      June 1, 2025

      New Xbox games launching this week, from June 2 through June 8 — Zenless Zone Zero finally comes to Xbox

      June 1, 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

      Student Record Android App using SQLite

      June 1, 2025
      Recent

      Student Record Android App using SQLite

      June 1, 2025

      When Array uses less memory than Uint8Array (in V8)

      June 1, 2025

      Laravel 12 Starter Kits: Definite Guide Which to Choose

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

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025
      Recent

      My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

      June 1, 2025

      A week of hell with my Windows 11 PC really makes me appreciate the simplicity of Google’s Chromebook laptops

      June 1, 2025

      Elden Ring Nightreign Night Aspect: How to beat Heolstor the Nightlord, the final boss

      June 1, 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 

    Hostinger
    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

    My top 5 must-play PC games for the second half of 2025 — Will they live up to the hype?

    June 1, 2025
    News & Updates

    A week of hell with my Windows 11 PC really makes me appreciate the simplicity of Google’s Chromebook laptops

    June 1, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    I replaced my TV with a 4K UST projector – and the visual upgrade was massive

    News & Updates

    Russian Man Indicted for Cyberattacks Targeting Ukraine with WhisperGate Malware Ahead of 2022 Invasion

    Development

    TMF Group Welcomes Kumar Ravi as New Chief Information Security Officer

    Development

    SonicWall Urges Immediate Patch for Critical CVE-2025-23006 Flaw Amid Likely Exploitation

    Development

    Highlights

    Development

    Medusa Ransomware Hits 40+ Victims in 2025, Demands $100K–$15M Ransom

    March 16, 2025

    The threat actors behind the Medusa ransomware have claimed nearly 400 victims since it first…

    Enhancing Video AI with Smart Caption-Based Rewards

    April 5, 2024

    CERT-In Warns of Information Disclosure Vulnerability in Tinxy Smart Devices

    March 16, 2025

    AutoGraph: An Automatic Graph Construction Framework based on LLMs for Recommendation

    January 6, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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