Skip to content

Commit

Permalink
docs/guidance/build/serialization.md: Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Mar 28, 2024
1 parent 4c5f24f commit 6f058dc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 30 deletions.
2 changes: 0 additions & 2 deletions docs/examples/serialization/flat.csv

This file was deleted.

17 changes: 0 additions & 17 deletions docs/examples/serialization/flat.json

This file was deleted.

4 changes: 2 additions & 2 deletions docs/examples/serialization/flat_two_items.csv
@@ -1,2 +1,2 @@
ocid,tag,tender/id,tender/items/0/id,tender/items/0/description,tender/items/1/id,tender/items/1/description
ocds-a2ef3d01-1594121,tender,ocds-a2ef3d01-1594121/1,1,Standards development,2,Documentation authoring
ocid,id,date,tag,tender/id,tender/title,tender/value/amount,tender/value/currency,tender/items/0/id,tender/items/0/description,tender/items/1/id,tender/items/1/description
ocds-213czf-0000,1,2024-01-01T00:00:00Z,tender,1,Purchase of office supplies,6000,USD,1,Paper,2,Ink
20 changes: 15 additions & 5 deletions docs/examples/serialization/flat_two_items.json
@@ -1,18 +1,28 @@
{
"version": "1.1",
"releases": [
{
"ocid": "ocds-a2ef3d01-1594121",
"tag": "tender",
"ocid": "ocds-213czf-0000",
"id": "1",
"date": "2024-01-01T00:00:00Z",
"tag": [
"tender"
],
"tender": {
"id": "ocds-a2ef3d01-1594121/1",
"id": "1",
"title": "Purchase of office supplies",
"value": {
"amount": 6000,
"currency": "USD"
},
"items": [
{
"id": "1",
"description": "Standards development"
"description": "Paper"
},
{
"id": "2",
"description": "Documentation authoring"
"description": "Ink"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions docs/guidance/build/serialization.md
Expand Up @@ -40,16 +40,16 @@ In each case, fields are identified in CSV headers by their [JSON Pointer](https

**JSON**

```{jsoninclude} ../../examples/serialization/flat.json
:jsonpointer:
:expand: releases, tender, items
```{jsoninclude} ../../examples/primer/primer.json
:jsonpointer: /releases/0
:expand: tag, tender, value
```

**CSV**

```{csv-table-no-translate}
:header-rows: 1
:file: ../../examples/serialization/flat.csv
:file: ../../examples/primer/primer.csv
```

[Beta open source tooling](https://flatten-tool.readthedocs.io/en/latest/usage-ocds/) exists for generating flat CSV OCDS templates, and converting in both directions between JSON spreadsheets following these templates. The OCDS Data Review Tool incorporates this tooling and will offer to convert files uploaded to it.
Expand Down

0 comments on commit 6f058dc

Please sign in to comment.