{"id":26131296,"url":"https://github.com/freckle/aeson-compat","last_synced_at":"2025-07-22T17:36:08.029Z","repository":{"id":271434743,"uuid":"912936512","full_name":"freckle/aeson-compat","owner":"freckle","description":"An OSS project providing compatibility modules for aeson","archived":false,"fork":false,"pushed_at":"2025-01-22T18:58:00.000Z","size":26,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-22T19:42:10.610Z","etag":null,"topics":["terraform-managed"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freckle.png","metadata":{"files":{"readme":"README.lhs","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-06T17:40:23.000Z","updated_at":"2025-01-22T18:58:03.000Z","dependencies_parsed_at":"2025-01-22T19:35:24.312Z","dependency_job_id":"d07f377c-5cbb-4971-a7e3-d81d602c40fb","html_url":"https://github.com/freckle/aeson-compat","commit_stats":null,"previous_names":["freckle/aeson-compat"],"tags_count":1,"template":false,"template_full_name":"freckle/haskell-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Faeson-compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Faeson-compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Faeson-compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Faeson-compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freckle","download_url":"https://codeload.github.com/freckle/aeson-compat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242933897,"owners_count":20208912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["terraform-managed"],"created_at":"2025-03-10T21:56:00.646Z","updated_at":"2025-03-10T21:56:02.516Z","avatar_url":"https://github.com/freckle.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aeson-compat\n\n[![Hackage](https://img.shields.io/hackage/v/aeson-compat.svg?style=flat)](https://hackage.haskell.org/package/aeson-compat)\n[![Stackage Nightly](http://stackage.org/package/aeson-compat/badge/nightly)](http://stackage.org/nightly/package/aeson-compat)\n[![Stackage LTS](http://stackage.org/package/aeson-compat/badge/lts)](http://stackage.org/lts/package/aeson-compat)\n[![CI](https://github.com/freckle/aeson-compat/actions/workflows/ci.yml/badge.svg)](https://github.com/freckle/aeson-compat/actions/workflows/ci.yml)\n\nCompatibility package between aeson major versions.\n\n## Organization\n\nThis library contains modules named `Data.Aeson.VN.M`, which\n\n1. Present the same interface as `Data.Aeson.M` as of aeson `vN`, and\n2. Compile with all versions of aeson\n\n## Example\n\n\u003c!--\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\n{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}\n\nmodule Main (main) where\nimport Prelude\nimport Text.Markdown.Unlit ()\n```\n--\u003e\n\n```haskell\nimport Data.Aeson\nimport qualified Data.Aeson.V2.Key as Key\nimport qualified Data.Aeson.V2.KeyMap as KeyMap\n\nsomeExample :: IO ()\nsomeExample = putStrLn\n  $ unwords\n  $ map Key.toString\n  $ KeyMap.keys\n  $ (\\(Object km) -\u003e km)\n  $ object\n    [ \"hello\" .= True\n    , \"world\" .= True\n    ]\n```\n\n\u003c!--\n```haskell\nmain :: IO ()\nmain = someExample\n```\n--\u003e\n\n## Gotchas\n\nThere are cases where it's not practical to match the aeson functionality\nexactly when we're making compatibility functions against older (or newer)\nversions. The following lists concessions we've made.\n\n- Our version of `alterF` (`unordered-containers \u003c 0.2.10`) may compute the hash\n  key multiple times, since we don't have access to the internals necessary to\n  pre-compute the key once and use it for any lookup, insert, and delete\n  actions.\n- We may use strict implementations for should-be lazy functions (or vice\n  versa). For example, in `unordered-containers \u003c 0.2.11`, `foldl = foldl'` and\n  `foldr' = foldr`.\n- Only one of `coercionToHashMap` or `coercionToMap` will be `Just`, depending\n  on your actual aeson version.\n- Either conversions dealing with `HashMap` or those dealing with `Map` will be\n  fast (runtime-erased), depending on your actual aeson version.\n\n## Development \u0026 Tests\n\n```console\nstack build --fast --pedantic --test --file-watch\n```\n\n---\n\n[CHANGELOG](./CHANGELOG.md) | [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Faeson-compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreckle%2Faeson-compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Faeson-compat/lists"}