Refactor JSON

* Move into seperate module
* Use aboslute pathing
This commit is contained in:
Bjorn Neergaard
2015-11-26 07:11:28 -05:00
parent 4e5edf396a
commit 56e359efb8
7 changed files with 266 additions and 282 deletions
+12
View File
@@ -0,0 +1,12 @@
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)