-
-
Notifications
You must be signed in to change notification settings - Fork 499
Open
Description
Describe the bug
When creating an harvester pointing to https://www.data.gouv.fr/api/1/datasets/?organization=5c812a16634f416583ed1876&page_size=1 it crash because of json structure like:
followers_by_months": {
"2024-08": 0,
...
"2025-08": 0
},
ending up in xml
<followers_by_months>
<2025-05>0</2025-05>
...
<2024-12>0</2024-12>
<2025-02>0</2025-02>
</followers_by_months>
which isn't valid, because xml tags :
- Start with a letter or underscore (_)
- Can contain letters, digits, hyphens (-), underscores (_), and periods (.)
- Cannot start with a number
It could be added something like .replaceAll("<(/?)([\\d-]*)>", "<$1_$2>");
To Reproduce
Steps to reproduce the behavior:
- Go to Harvesters
- Url https://www.data.gouv.fr/api/1/datasets/?organization=5c812a16634f416583ed1876&page_size=1
- Loop
/data
- Id
/id
Expected behavior
A metadata harvested
Log file
Error on line 1
Metadata
Metadata
Assignees
Labels
No labels