Files
Bubberstation/code/modules/json/json.dm
Bjorn Neergaard 56e359efb8 Refactor JSON
* Move into seperate module
* Use aboslute pathing
2015-11-26 07:11:28 -05:00

12 lines
320 B
Plaintext

proc/json2list(json)
var/static/json_reader/_jsonr = new()
return _jsonr.ReadObject(_jsonr.ScanJson(json))
proc/list2json(list/L)
var/static/json_writer/_jsonw = new()
return _jsonw.write(L)
proc/list2json_usecache(list/L)
var/static/json_writer/_jsonw = new()
_jsonw.use_cache = 1
return _jsonw.write(L)