Empty ingredient list are objects and not array in the data dump
Posted: Mon Dec 22, 2025 1:59 pm
Hello hello,
It's my first time here, please tell me if I'm doing anything wrong or if this should be posted somewhere else !
I've been trying to parse the Factorio data dumped with --dump-data for funny projects on my side, and it appears that empty arrays are dumped as json objects instead of arrays.
For example, the biter egg recipe:
Or the fluid-unknown base-color:
Therefore, when attempting to parse it, I'm expecting an array and get hit with an invalid type.
Perhaps there is a --dump-data option I'm missing here ? Or there might be others reasons I'm unaware of to have it this way ?
Thanks in advance, and a lot of thanks for the game, cheers !
- Eclipse
It's my first time here, please tell me if I'm doing anything wrong or if this should be posted somewhere else !
I've been trying to parse the Factorio data dumped with --dump-data for funny projects on my side, and it appears that empty arrays are dumped as json objects instead of arrays.
For example, the biter egg recipe:
Code: Select all
"ingredients":
{},
Code: Select all
"base_color":
{},
Perhaps there is a --dump-data option I'm missing here ? Or there might be others reasons I'm unaware of to have it this way ?
Thanks in advance, and a lot of thanks for the game, cheers !
- Eclipse