Use minimal example json to show how to import .json files
- Lingua principale
- JavaScript
- Stelle
- 14
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
It's worth doing but currently I get the following error message:
```
cargo run --bin import_traffic -- \
--map=data/system/us/seattle/maps/montlake.bin \
--input=minimal_scenario2.json
Finished dev [unoptimized + debuginfo] target(s) in 0.13s
Running `target/debug/import_traffic --map=data/system/us/seattle/maps/montlake.bin --input=minimal_scenario2.json`
import traffic demand data...
Read data/system/us/seattle/maps/montlake.bin (3)... 0.4303s
parse minimal_scenario2.json...
parse minimal_scenario2.json took 0.0001s
thread 'main' panicked at 'Couldn't read_json(minimal_scenario2.json): invalid type: floating point `10800`, expected i32 at line 7 column 30', /mnt/57982e2a-2874-4246-a6fe-115
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
The error indicates a JSON parsing issue where a floating point value is provided but an integer is expected. Look at the import_traffic binary and the JSON schema it expects. Examine the minimal_scenario2.json file to understand the structure and correct the type mismatch. Running the cargo command with the corrected JSON will verify the fix.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100