Expose JSON API to mods

Things that already exist in the current mod API
Zomis
Inserter
Inserter
Posts: 33
Joined: Fri Apr 21, 2017 7:01 pm
Contact:

Expose JSON API to mods

Post by Zomis »

Parts of Factorio are already using JSON. Considering how well-known the format is and the fact that some mods already have their own JSON implementation, I'd like to see a JSON serialization/deserialization API exposed for modders to use. I bet that performance-wise it is much more efficient to do it in C++ than in Lua - both creating the JSON and iterating through the Lua table/value to be serialized.

Therefore, I'd like to see a JSON API exposed for modders to use.
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Expose JSON API to mods

Post by posila »

You need to be more specific, because I am not sure if you are not aware of these: https://lua-api.factorio.com/latest/Lua ... le_to_json or that's not what you want.
Zomis
Inserter
Inserter
Posts: 33
Joined: Fri Apr 21, 2017 7:01 pm
Contact:

Re: Expose JSON API to mods

Post by Zomis »

Huh, thanks, I was not aware of these. It does indeed look like exactly what I was looking for!

And here I thought I was coming up with something new... you folks think of everything :)
Post Reply

Return to “Already exists”