TOML
A Chicken wrapper for the TOML configuration language
Requirements
Usage
(import toml)Loading TOML configuration
(table-from-file FILENAME) --> TomlTableLoads FILENAME contents as a TOML configuration.
(table-from-string STRING) --> TomlTableLoads the contents of STRING as TOML configuration.
Tables
(TOMLTABLE 'self-key) --> stringReturns the key, if any, to which TOMLTABLE is assigned.
(TOMLTABLE 'key-exists? KEY) --> boolChecks if KEY exists in TOMLTABLE.
Returns the number of key-value entries, arrays, or tables respectively in TOMLTABLE.
(toml-key-at TOMLTABLE INDEX) --> stringReturns the table key at position INDEX in TOMLTABLE.
Returns the element of the given type in TOMLTABLE at KEY.
Arrays
(TOMLARRAY 'self-key) --> stringReturns the key, if any, to which TOMLARRAY is assigned.
(TOMLARRAY 'count-entries) --> intReturns the number of entries in TOMLARRAY.
Returns the element of the given type in TOMLARRAY at KEY.
About this egg
Authors
Daniel Ziltener
CK Tan
Repository
The repository of the Chicken wrapper can be found at https://forgejo.lyrion.ch/Chicken/toml.
The repository of the C implementation being wrapped can be found at https://github.com/cktan/tomlc99.
Version History
- 0.9
- port to Chicken 6
- 0.8
- updated the tomlc99 dependency
- 0.7
- fixed an issue with timestamp parsing
- 0.6
- first version of the wrapper
License
MIT License
Copyright (c) Daniel Ziltener https://forgejo.lyrion.ch/Chicken/toml
Copyright (c) CK Tan https://github.com/cktan/tomlc99
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.