Hi - thanks for this mod! It has been a huge time saver when running calculations outside of the game.
I've found that some sections of the exported JSON contain invalid tokens. Specifically, they contain raw literals like inf and -inf. These occur in the output from the latest version (1.1.36) in two sections ("resource" and "tile"), in subsections related to "autoplace_specification". These sections seem to contain the serialized AST for Lua functions. In context, the invalid tokens look something like this:
{
"type" : "literal-number",
"literal_value" : -inf
}
Special float values like inf and NaN are not allowed by the JSON spec, so compliant parsers will choke on them. These infinities are legitimate values in the underlying Lua data, so the best fix is probably to encode them as strings:
{
"type" : "literal-number",
"literal_value" : "-inf"
}