This behavior:
|
if "," in value: |
|
return [x.split(",") for x in value.split(";")] |
|
else: |
|
return value.split(";") |
originates from dcba86e
However, I don't know why ; and , are handled differently.
flatterer uses commas instead of ;. So:
uv run flatten-tool unflatten -s schema.json -f csv dir
where schema.json is:
{
"properties": {
"tag": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
and main.csv in dir/ is:
produces:
{
"main": [
{
"tag": [
[
"a",
"b",
"c"
]
]
}
]
}
But if you use semi-colons, it's as desired:
{
"main": [
{
"tag": [
"a",
"b",
"c"
]
}
]
}