{"id":37413265,"url":"https://github.com/toml-f/jonquil","last_synced_at":"2026-01-16T05:57:52.629Z","repository":{"id":52489430,"uuid":"520663644","full_name":"toml-f/jonquil","owner":"toml-f","description":"Bringing TOML blooms to JSON land","archived":false,"fork":false,"pushed_at":"2025-12-12T11:26:48.000Z","size":66,"stargazers_count":8,"open_issues_count":6,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-13T23:39:53.162Z","etag":null,"topics":["fortran-library","fortran-package-manager","json","json-parser","serde"],"latest_commit_sha":null,"homepage":"https://toml-f.github.io/jonquil","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toml-f.png","metadata":{"funding":{"github":["awvwgk"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-08-02T22:12:55.000Z","updated_at":"2025-12-12T11:26:52.000Z","dependencies_parsed_at":"2025-05-18T11:36:14.033Z","dependency_job_id":null,"html_url":"https://github.com/toml-f/jonquil","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/toml-f/jonquil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toml-f%2Fjonquil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toml-f%2Fjonquil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toml-f%2Fjonquil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toml-f%2Fjonquil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toml-f","download_url":"https://codeload.github.com/toml-f/jonquil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toml-f%2Fjonquil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fortran-library","fortran-package-manager","json","json-parser","serde"],"created_at":"2026-01-16T05:57:52.007Z","updated_at":"2026-01-16T05:57:52.616Z","avatar_url":"https://github.com/toml-f.png","language":"Fortran","funding_links":["https://github.com/sponsors/awvwgk"],"categories":[],"sub_categories":[],"readme":"# Jonquil\n\n*Bringing TOML blooms to JSON land*\n\n[![License](https://img.shields.io/badge/license-MIT%7CApache%202.0-blue)](LICENSE-Apache)\n[![CI](https://github.com/toml-f/jonquil/actions/workflows/fortran-build.yml/badge.svg)](https://github.com/toml-f/jonquil/actions/workflows/fortran-build.yml)\n\nJonquil is a JSON library for Fortran, built on top of [TOML Fortran](https://github.com/toml-f/toml-f).\nIt provides a simple API for parsing and serializing JSON data, with seamless interoperability with TOML data structures.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./assets/jonquil.svg\" alt=\"Jonquil Blossoms\" width=\"220\"\u003e\n\u003c/div\u003e\n\n## Features\n\n- **Parse JSON** from files or strings\n- **Serialize** Fortran data structures to JSON\n- **Seamless compatibility** with TOML Fortran data structures\n- **Modern Fortran** (2008 standard)\n- **Multiple build systems**: fpm, Meson, and CMake\n\n\n## Quick Start\n\nAdd Jonquil to your `fpm.toml`:\n\n```toml\n[dependencies]\njonquil.git = \"https://github.com/toml-f/jonquil\"\n```\n\nParse and work with JSON:\n\n```fortran\nprogram example\n  use jonquil\n  implicit none\n\n  class(json_value), allocatable :: data\n  type(json_object), pointer :: object\n  type(json_error), allocatable :: error\n  character(:), allocatable :: name\n  integer :: count\n\n  ! Parse JSON from a string\n  call json_loads(data, '{\"name\": \"Fortran\", \"count\": 42}', error=error)\n  if (allocated(error)) error stop error%message\n\n  ! Access values\n  object =\u003e cast_to_object(data)\n  call get_value(object, \"name\", name)\n  call get_value(object, \"count\", count)\n\n  print '(a,a)', \"Name: \", name\n  print '(a,i0)', \"Count: \", count\n\n  ! Serialize back to JSON\n  print '(a)', json_serialize(data)\nend program example\n```\n\n\n## Documentation\n\n- **[TOML Fortran Documentation](https://toml-f.readthedocs.io)** - Comprehensive guide (Jonquil follows the same API patterns)\n- **[Jonquil Guide](https://toml-f.readthedocs.io/en/latest/how-to/jonquil.html)** - Jonquil-specific documentation\n- **[JSON Specification](https://www.json.org/json-en.html)** - Official JSON format reference\n\n\n## Installation\n\n### Using fpm (recommended)\n\nAdd to your `fpm.toml`:\n\n```toml\n[dependencies]\njonquil.git = \"https://github.com/toml-f/jonquil\"\n```\n\nBuild and run:\n\n```bash\nfpm build\nfpm test\n```\n\n### Using Meson\n\n```bash\ngit clone https://github.com/toml-f/jonquil\ncd jonquil\nmeson setup _build\nmeson compile -C _build\nmeson test -C _build\n```\n\n### Using CMake\n\n```bash\ngit clone https://github.com/toml-f/jonquil\ncd jonquil\ncmake -B _build -G Ninja\ncmake --build _build\nctest --test-dir _build\n```\n\nFor detailed installation instructions, see the [installation guide](https://toml-f.readthedocs.io/en/latest/how-to/installation.html).\n\n\n## API Overview\n\n### Key Types\n\n| Jonquil Type | TOML Fortran Type | Description |\n|--------------|-------------------|-------------|\n| `json_object` | `toml_table` | Key-value mapping |\n| `json_array` | `toml_array` | Ordered list of values |\n| `json_value` | `toml_value` | Base type for all values |\n| `json_error` | `toml_error` | Error information |\n\n### Key Procedures\n\n| Procedure | Description |\n|-----------|-------------|\n| `json_load(val, filename)` | Load JSON from a file |\n| `json_loads(val, string)` | Load JSON from a string |\n| `json_dump(val, filename)` | Write JSON to a file |\n| `json_dumps(val, string)` | Write JSON to a string |\n| `json_serialize(val)` | Serialize and return as string |\n| `get_value(object, key, val)` | Get a value from an object |\n| `set_value(object, key, val)` | Set a value in an object |\n\n\n## TOML Fortran Compatibility\n\nJonquil data structures are fully compatible with TOML Fortran.\nYou can use procedures from either library interchangeably:\n\n```fortran\nprogram compatibility\n  use jonquil, only : json_loads, json_value, json_object, cast_to_object\n  use tomlf, only : toml_array, add_array, set_value, toml_serialize\n  implicit none\n\n  class(json_value), allocatable :: data\n  type(json_object), pointer :: object\n  type(toml_array), pointer :: array\n\n  ! Parse with Jonquil\n  call json_loads(data, '{\"values\": [1, 2, 3]}')\n  object =\u003e cast_to_object(data)\n\n  ! Modify with TOML Fortran\n  call add_array(object, \"more\", array)\n  call set_value(array, [4, 5, 6])\n\n  ! Serialize with TOML Fortran\n  print '(a)', toml_serialize(object)\nend program compatibility\n```\n\n\n## Requirements\n\n- **Fortran compiler** supporting Fortran 2008:\n  - GFortran 5+\n  - Intel Fortran 18+\n  - NAG 7+\n- **Build system** (one of):\n  - [fpm](https://github.com/fortran-lang/fpm) 0.2.0+\n  - [Meson](https://mesonbuild.com) 0.55+\n  - [CMake](https://cmake.org/) 3.9+\n\n\n## Contributing\n\nContributions are welcome!\nPlease read the [contributing guidelines](https://github.com/toml-f/toml-f/blob/main/CONTRIBUTING.md) to get started.\n\n\n## License\n\nJonquil is free software: you can redistribute it and/or modify it under the terms of the [Apache License, Version 2.0](LICENSE-Apache) or [MIT license](LICENSE-MIT) at your opinion.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _as is_ basis, without warranties or conditions of any kind, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Jonquil by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoml-f%2Fjonquil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoml-f%2Fjonquil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoml-f%2Fjonquil/lists"}