{"id":19910259,"url":"https://github.com/juri/sexpyjson","last_synced_at":"2026-05-13T14:36:54.277Z","repository":{"id":47266092,"uuid":"396381946","full_name":"juri/SexpyJSON","owner":"juri","description":"JSON templating library for Swift","archived":false,"fork":false,"pushed_at":"2022-04-19T15:00:40.000Z","size":321,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T22:32:51.132Z","etag":null,"topics":["json","lisp","swift","template"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/juri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-15T14:41:46.000Z","updated_at":"2021-10-05T15:36:27.000Z","dependencies_parsed_at":"2022-09-03T23:42:10.298Z","dependency_job_id":null,"html_url":"https://github.com/juri/SexpyJSON","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juri%2FSexpyJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juri%2FSexpyJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juri%2FSexpyJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juri%2FSexpyJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juri","download_url":"https://codeload.github.com/juri/SexpyJSON/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241337795,"owners_count":19946487,"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","lisp","swift","template"],"created_at":"2024-11-12T21:18:13.509Z","updated_at":"2026-05-13T14:36:54.249Z","avatar_url":"https://github.com/juri.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SexpyJSON\n\n![Swift build status](https://github.com/juri/SexpyJSON/actions/workflows/swift.yml/badge.svg)\n\n(The builds are broken because SexpyJSON requires Swift 5.6 not supported in GitHub actions yet.)\n\nSexpyJSON is a JSON templating language that allows you to embed (something that looks a lot like) Lisp in\nJSON in Lisp in JSON. This implementation is in Swift.\n\n## License\n\nSexpyJSON is distributed under the terms of the MIT license. See LICENSE for details.\n\n## Code of Conduct\n\nThis project is released with a Contributor Covenant Code of Conduct. By participating in this project you agree \nto abide by its terms.\n\n## Introduction\n\nThe top-level element of a SexpyJSON document can be any JSON value (object, array, string, number, null) or\na s-expression. You can interleave the s-expressions and JSON objects. Any JSON value can be replaced by a\ns-expression, and values inside the s-expressions can be JSON types. \n\nThe s-expressions can contain side-effecting subexpressions (calls to functions passed in from outside,\nname definitions), but must in the end return a value convertible to JSON.\n\n### Examples\n\n```\n\"hello\"\n```\n\n```\n10\n```\n\n```\n[\"hello\", (concat \"wor\" \"ld\")]\n```\n\n```\n{\n    \"url\": url-passed-from-outside,\n    \"body-parameters\": (merge\n        common-variables\n        {\n            \"dp\": (concat \"/\" section \"/\" (sub article \"title\"))\n        }\n    )\n}\n```\n\n## Language Documentation\n\nYou can find documentation for the language on this project's [GitHub Pages site](https://juri.github.io/SexpyJSON/).\n\n## Swift Library Usage\n\nTo use the Swift library, add the following to the dependency list in your `Package.swift`:\n\n```swift\n// It's a good idea to use an exact revision before there's any releases\n.package(url: \"https://github.com/juri/SexpyJSON\", .revision(\"bb3ff1736798a7bafa9da1e33de3c5a8e5a7dc7e\"))\n```\n\nAfter that, you can add `\"SexpyJSON\"` to a target's dependency list.\n\n## Swift Library Documentation\n\nUse Xcode's \"Build Documentation\" to build library documentation. If you want to take a look at the public interface,\nsee [Public.swift](https://github.com/juri/SexpyJSON/blob/main/Sources/SexpyJSON/Public.swift).\n\n## `sxpj` command line tool\n\nSexpyJSON comes with a command line tool, `sxpj`. To build and install it, run:\n\n```shell\n$ swift build --product sxpj -c release\n$ cp .build/release/sxpj /usr/local/bin\n```\n\nIt takes as an argument a list of expressions and outputs the result of the last one:\n\n```shell\n$ sxpj '(define a \"KA\")' '(define b \"-POW!\")' '(concat a b)'\n\"KA-POW!\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuri%2Fsexpyjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuri%2Fsexpyjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuri%2Fsexpyjson/lists"}