Crates.io | ion |
lib.rs | ion |
version | 0.9.1 |
source | src |
created_at | 2015-08-11 18:38:45.761383 |
updated_at | 2024-03-26 07:39:04.655308 |
description | *.ion file parser |
homepage | https://github.com/ion-rs/ion |
repository | https://github.com/ion-rs/ion |
max_upload_size | |
id | 2817 |
size | 704,715 |
ion
is a sophisticated parser for *.ion
files, crafted in Rust to handle a versatile data format. This format is ideal for configurations and structured data, supporting a diverse range of types like String
, Integer (i64)
, Float (f64)
, Boolean
, Arrays
, and Dictionary
.
The following examples demonstrate the flexibility and structure of *.ion
files:
[CONTRACT]
id = "HOTEL001"
name = "Hotel001"
currency = "EUR"
active = true
markets = ["DE", "PL"]
[DEF.MEAL]
| code | description |
|------|-------------|
| RO | Room Only |
[DEF.ROOM]
| code | description | occ |
|------|-------------|----------------|
| SGL | Single | P1:2 A1:1 C0:1 |
| DBL | Double | P2:3 A2:2 C0:1 |
[CONTRACT]
country = "Poland" // String
markets = ["PL", "DE", "UK"] // Array
75042 = { // Dictionary
view = "SV" // String
loc = ["M", "B"] // Array
dist = { beach_km = 4.1 } // Dictionary
}
[CONTRACT]
country = "Poland"
markets = ["PL", "DE", "UK"]
75042 = {
view = "SV"
loc = ["M", "B"]
dist = { beach_km = 4.1 }
}
[RATE.PLAN]
| dates | code | description | rooms | rules |
|-------------------|------|----------------|-------------|-------|
| 20200512:20200514 | BAR | Best available | SGL,DBL,APP | |
| 20200601:20200614 | BBV | Best Bar View | DBL,APP | |
# A `key-value` and `table` section
[RATE.BASE]
enable = true
legend = {
UN = "unit night"
RO = "room only"
}
| dates | charge | room | occ | meal | amt |
|-------------------|--------|------|-----|------|--------|
| 20161122:20170131 | UN | APP | A2 | RO | 250.00 |
| 20161122:20170131 | UN | APP | A4 | RO | 450.00 |
| 20161122:20170131 | UN | APP | A6 | RO | 650.00 |
Licensed under the MIT license.