SShortSingh.
Back to feed

New Haskell library brings Elm-style JSON encoding and decoding to Haskell

0
·1 views

Developer Dwayne has released hs-json-codec, a Haskell library that mirrors the JSON decoding and encoding style of Elm's elm/json package. The library is built on top of another library he authored, hs-json-parser, which handles general-purpose JSON parsing and printing. Both libraries were originally created to support his elm2nix project, which converts Elm dependency files into Nix lock files, but are designed for use in any Haskell project. The library allows developers to compose small, reusable decoders and encoders to handle complex JSON structures, including optional fields and nested objects. Elm developers transitioning to Haskell will find the API familiar, as it closely follows the patterns established by Elm's official JSON library.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Why Clarifying Your Question Before Using AI Leads to Better Results

A developer reflects on how years of using generative AI have gradually shifted more cognitive work away from the user and toward the tool. Research suggests that people who rely on AI to solve problems tend to retain less information than those who work through problems independently. The author observes that AI works best as a finishing tool — catching errors, refining phrasing, and filling gaps — rather than as a starting point for ideas that require personal opinion or taste. A recurring frustration with AI-generated output, the author notes, often stems not from the tool's limitations but from poorly formed questions on the user's end. The key insight is that articulating a clear, specific question requires doing roughly half the thinking yourself, which in turn makes AI assistance far more effective.

0
ProgrammingDEV Community ·

Dev shares hard lessons from building a real-world enterprise app ecosystem

A developer behind 24hours.lk and its companion 24 Eco System mobile suite has shared key engineering lessons learned from building production-grade enterprise applications. The experience revealed that real-world apps, unlike controlled development environments, must handle concurrent requests, partial failures, version mismatches, and large-scale data — often simultaneously. Because both web and mobile clients shared the same backend, even minor API changes carried ecosystem-wide consequences, demanding careful attention to versioning, validation, and backward compatibility. Database design proved equally complex, with seemingly efficient queries becoming costly bottlenecks at scale, requiring deliberate indexing, pagination, and query optimization strategies. The core takeaway was a shift in mindset: enterprise development is less about building features and more about deciding where each feature belongs within a resilient, well-structured architecture.

0
ProgrammingHacker News ·

Critical RCE Vulnerability Actively Exploited Across All Chromium Versions

A critical remote code execution (RCE) vulnerability has been identified in all versions of Chromium, the open-source browser engine powering Google Chrome and other browsers. The flaw, tracked as CVE-2026-85046, allows attackers to escape the browser sandbox and execute arbitrary code on affected systems. The vulnerability is listed in the National Vulnerability Database (NVD) maintained by NIST. Because it is being actively exploited in the wild, users of Chromium-based browsers are considered at immediate risk. Security researchers and the broader community have flagged the issue as high priority, urging prompt patching once a fix becomes available.

0
ProgrammingDEV Community ·

OpenBSD 7.9 Released as Project's 60th Version, Upgrade Guide Available

The OpenBSD project released version 7.9 on May 19, 2026, marking the operating system's 60th release. The upgrade from 7.8 to 7.9 can be performed using the built-in sysupgrade tool, which automates downloading, verifying, and installing the new system sets. Before upgrading, users should ensure the /usr partition has at least 1.1GB of free space and review configuration and package changes, including a major PostgreSQL update to version 18.1. An optional response file, /auto_upgrade.conf, allows users to customize which installation sets are included or excluded during the process. Once sysupgrade is initiated it cannot be stopped, so the system reboots automatically to complete the upgrade and run sysmerge for configuration file handling.