{"id":13800501,"url":"https://github.com/justinwoo/purescript-simple-json","last_synced_at":"2025-04-07T12:08:11.361Z","repository":{"id":22727359,"uuid":"97152772","full_name":"justinwoo/purescript-simple-json","owner":"justinwoo","description":"A simple Purescript JSON library that uses types automatically","archived":false,"fork":false,"pushed_at":"2023-06-02T13:18:40.000Z","size":133,"stargazers_count":134,"open_issues_count":5,"forks_count":46,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-22T18:26:39.482Z","etag":null,"topics":["json","purescript","type-level"],"latest_commit_sha":null,"homepage":"http://purescript-simple-json.readthedocs.io","language":"PureScript","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/justinwoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-13T18:20:33.000Z","updated_at":"2024-02-04T13:08:59.000Z","dependencies_parsed_at":"2024-01-08T14:30:44.635Z","dependency_job_id":"b4d45824-5e46-42e3-8eff-f7a0a24a057a","html_url":"https://github.com/justinwoo/purescript-simple-json","commit_stats":{"total_commits":132,"total_committers":18,"mean_commits":7.333333333333333,"dds":0.303030303030303,"last_synced_commit":"5c7bc33c8ff3df0cde714545626981377280c081"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-simple-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-simple-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-simple-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-simple-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/purescript-simple-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["json","purescript","type-level"],"created_at":"2024-08-04T00:01:13.177Z","updated_at":"2025-04-07T12:08:11.320Z","avatar_url":"https://github.com/justinwoo.png","language":"PureScript","readme":"# PureScript-Simple-JSON\n\n![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/justinwoo/purescript-simple-json/ci.yml?branch=master\u0026style=flat-square\u0026logo=github)\n[\u003cimg alt=\"documentation status\" src=\"https://img.shields.io/readthedocs/purescript-simple-json/latest?logo=read-the-docs\u0026style=for-the-badge\" height=\"20\"\u003e](https://readthedocs.org/projects/purescript-simple-json/badge/?version=latest)\n\nA simple Foreign/JSON library based on the Purescript's RowToList feature.\n\n## Quickstart\n\nGet going quickly with the Quickstart section of the guide: \u003chttps://purescript-simple-json.readthedocs.io/en/latest/quickstart.html\u003e\n\nYou may also be interested in this presentation about how Simple-JSON works well with PureScript-Record: \u003chttps://speakerdeck.com/justinwoo/easy-json-deserialization-with-simple-json-and-record\u003e. Note that the slides are based on an older version of the library and on PureScript 0.11.6, and it is not necessary to understand these slides to get started.\n\n## Usage\n\nIn brief:\n\n```purs\ntype MyJSON =\n  { apple :: String\n  , banana :: Int\n  , cherry :: Maybe Boolean\n  }\n  \ndecodeToMyJSON :: String -\u003e Either (NonEmptyList ForeignError) MyJSON\ndecodeToMyJSON = SimpleJSON.readJSON\n```\n\nSee the [API Docs](https://pursuit.purescript.org/packages/purescript-simple-json/) or the [tests](test/Main.purs) for usage.\n\nThere is also a guide for how to use this library on [Read the Docs](https://purescript-simple-json.readthedocs.io/en/latest/).\n\n## Warning: `Maybe`\n\nThis library will decode `undefined` and `null` as `Nothing` and write `Nothing` as `undefined`. Please use the `Nullable` type if you'd like to read and write `null` instead. Please take caution when using `Maybe` as this default may not be what you want.\n\n## FAQ\n\n### How do I use this with Affjax?\n\nPlease see this page in the guide: \u003chttps://purescript-simple-json.readthedocs.io/en/latest/with-affjax.html\u003e\n\n### How do I change how some fields of my JSON objects are read?\n\nPlease see this page in the guide: \u003chttps://purescript-simple-json.readthedocs.io/en/latest/inferred-record-types.html\u003e\n\n### How do I work with `data` Types?\n\nPlease see this page in the guide: \u003chttps://purescript-simple-json.readthedocs.io/en/latest/generics-rep.html\u003e\n\n### Why won't you accept my Pull Request?\n\nPlease read this appeal from another open source author: \u003chttps://github.com/benbjohnson/litestream#open-source-not-open-contribution\u003e\n\n### How should I actually use this library?\n\nJames Brock has informed me that people still do not understand that this library should be used not as a library. If you do not like any of the behavior in this library or would like to opt out of some behaviors, you should copy this library into your own codebase. Please see that this libraries does not actually contain many lines of code and you should be able to learn how to construct this library from scratch with a few days of reading.\n","funding_links":[],"categories":["PureScript","Json Serialization"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-simple-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Fpurescript-simple-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-simple-json/lists"}