Specification

PSV specification is in active development - Coming soon!

PSV (Pipe Separated Value) File Format Specification

Example

ID [str] [uuid] [unique] [key] {#id} Name Birthday [date] Want Candy (jellybeans) [bool] Candy Count [int]
0b32a75e-e190-4a71-b0e1-45e0d826584f Alice 1994-05-15 yes 10
1e6e3e5a-f6cf-4b30-bc42-5365418604a1 Bob 1989-08-20 no  
9a7f548f-0854-4c23-bb39-1aefb48b47ae Charlie 1996-12-10 yes 32
d12cc354-8845-4dc2-91b0-d714f2a33ef3 David 1982-03-25 yes 42
cf0294f1-8d71-4e01-9619-62ebfdd2a47d Emma 1989-11-02 no  
e4fcb648-7f80-464d-9a0d-bc00ac9d5f58 Frank 1979-06-30 no  
b5c79927-5250-4919-848d-68f0c5d2e11d Grace 1993-09-18 no  
f0d31595-0d11-4f33-b9b1-c8b95eb354a1 Henry 1987-04-11 yes 42
bfc1db9b-f9e1-4dd9-b1d1-22f74264e0e0 Isabella 1991-07-29 yes 12
149118b2-08e0-4e6a-bc6a-f56184f7a7fc John 1980-10-05 no  
b38e1601-60ff-4458-8ae5-6efdfaa69d0f Mia 1997-02-28 yes 24
{#personnel}
| ID [str] [uuid] [unique] [key] {#id} | Name     | Birthday [date] | Want Candy (jellybeans) [bool] | Candy Count [int] |
| ---                                  | ---      | ---             | ---                            | ---               |
| 0b32a75e-e190-4a71-b0e1-45e0d826584f | Alice    | 1994-05-15      | yes                            | 10                |
| 1e6e3e5a-f6cf-4b30-bc42-5365418604a1 | Bob      | 1989-08-20      | no                             |                   |
| 9a7f548f-0854-4c23-bb39-1aefb48b47ae | Charlie  | 1996-12-10      | yes                            | 32                |
| d12cc354-8845-4dc2-91b0-d714f2a33ef3 | David    | 1982-03-25      | yes                            | 42                |
| cf0294f1-8d71-4e01-9619-62ebfdd2a47d | Emma     | 1989-11-02      | no                             |                   |
| e4fcb648-7f80-464d-9a0d-bc00ac9d5f58 | Frank    | 1979-06-30      | no                             |                   |
| b5c79927-5250-4919-848d-68f0c5d2e11d | Grace    | 1993-09-18      | no                             |                   |
| f0d31595-0d11-4f33-b9b1-c8b95eb354a1 | Henry    | 1987-04-11      | yes                            | 42                |
| bfc1db9b-f9e1-4dd9-b1d1-22f74264e0e0 | Isabella | 1991-07-29      | yes                            | 12                |
| 149118b2-08e0-4e6a-bc6a-f56184f7a7fc | John     | 1980-10-05      | no                             |                   |
| b38e1601-60ff-4458-8ae5-6efdfaa69d0f | Mia      | 1997-02-28      | yes                            | 24                |
Example JSON Output Generated By PSV.c ```json { "id": "personnel", "headers": [ "ID [str] [uuid] [unique] [key] {#id}", "Name", "Birthday [date]", "Want Candy (jellybeans) [bool]", "Candy Count [int]" ], "keys": [ "id", "name", "birthday", "want_candy", "candy_count" ], "data_annotation": [ [ "str", "uuid", "unique", "key" ], [], [ "date" ], [ "bool" ], [ "int" ] ], "rows": [ { "id": "0b32a75e-e190-4a71-b0e1-45e0d826584f", "name": "Alice", "birthday": "1994-05-15", "want_candy": true, "candy_count": 10 }, { "id": "1e6e3e5a-f6cf-4b30-bc42-5365418604a1", "name": "Bob", "birthday": "1989-08-20", "want_candy": false, "candy_count": null }, { "id": "9a7f548f-0854-4c23-bb39-1aefb48b47ae", "name": "Charlie", "birthday": "1996-12-10", "want_candy": true, "candy_count": 32 }, { "id": "d12cc354-8845-4dc2-91b0-d714f2a33ef3", "name": "David", "birthday": "1982-03-25", "want_candy": true, "candy_count": 42 }, { "id": "cf0294f1-8d71-4e01-9619-62ebfdd2a47d", "name": "Emma", "birthday": "1989-11-02", "want_candy": false, "candy_count": null }, { "id": "e4fcb648-7f80-464d-9a0d-bc00ac9d5f58", "name": "Frank", "birthday": "1979-06-30", "want_candy": false, "candy_count": null }, { "id": "b5c79927-5250-4919-848d-68f0c5d2e11d", "name": "Grace", "birthday": "1993-09-18", "want_candy": false, "candy_count": null }, { "id": "f0d31595-0d11-4f33-b9b1-c8b95eb354a1", "name": "Henry", "birthday": "1987-04-11", "want_candy": true, "candy_count": 42 }, { "id": "bfc1db9b-f9e1-4dd9-b1d1-22f74264e0e0", "name": "Isabella", "birthday": "1991-07-29", "want_candy": true, "candy_count": 12 }, { "id": "149118b2-08e0-4e6a-bc6a-f56184f7a7fc", "name": "John", "birthday": "1980-10-05", "want_candy": false, "candy_count": null }, { "id": "b38e1601-60ff-4458-8ae5-6efdfaa69d0f", "name": "Mia", "birthday": "1997-02-28", "want_candy": true, "candy_count": 24 } ] } ```

Table Structure

A PSV table consists of the following components:

  1. Table ID (Optional): A table can have an optional ID specified using the Consistent Attribute Syntax, enclosed in curly braces followed by a hash (#) and the desired ID. e.g., {#table-id}

  2. Header Row: The first row of the table, containing the column names. Column headers can include data annotations within square brackets to specify the expected data type or format of values in that column. e.g., | Name | Age [int] | City [str] |

  3. Delimiter Row: A row consisting of dashes (-) separating the header row from the data rows.

  4. Data Rows: The subsequent rows containing the actual data for each column.

Features

Data Annotations

Data annotations within square brackets in the header row specify the expected data type or format of values in that column. The following data annotations are supported:

Additional data annotations can be added in the future to support other data types or formats.

Cell Properties

Cell properties can be specified within square brackets after the data annotation (if present) or after the column name (if no data annotation is provided). These properties provide additional metadata or constraints for the values in that column. The following cell properties are supported:

Output Formats

The PSV format is designed to be easily converted to other structured data formats, such as JSON or CBOR, following the guidelines outlined in the psv repository.

Limitations and Considerations