For windows, there are two things that need to be different to take in JSON data from the command line (for those who were lost like me).
cmddoesn’t have strong quotation using single quotes, so we have to escape double quotes like this:--input "data={\"some-num\": 1, \"some-bool\": true}"- For typst 0.13.1, it says that
json.decode()is deprecated, but not using it and passing the data directly to the json functionjson(sys.inputs.data)results in this error:
error: failed to load file (The filename, directory name, or volume label syntax is incorrect. (os error 123))
┌─ \\?\C:\Users\<redacted>\Desktop\typst\testing\test.typ:11:14
│
11 │ #let d = json(sys.inputs.data)
│
So, just using json.decode() works fine.