So, as far as I can tell, the server and the webclient use json in some fashion to communicate.
So my thinking, (if the above is true) is that since DD has to already have some json parsing functions, opening access to those up would be super handy. mostly because it could avoid 5 gazillion string tree lookups pledging the ones we use.
Just some simple jsonEncode and jsonDecode procs, having it go to jagged arrays (lists of lists) or from.
We already use json in ss13 as the communication between the auto updating JS based rich interfaces and the server, but it's performance is kinda lacking, mainly because the string tree is a thing.
ID:1982708
Nov 15 2015, 2:45 am
|
|||||||
Resolved
| |||||||
Nov 15 2015, 10:30 am
|
|
Good idea.
|
In response to Lummox JR
|
|
While you're looking at JSON stuff, ?format=json for hub stuff as well pretty-please?
|
In response to Murrawhip
|
|
Murrawhip wrote:
While you're looking at JSON stuff, ?format=json for hub stuff as well pretty-please? https://jsonformatter.curiousconcept.com/ http://codebeautify.org/jsonviewer http://jsonprettyprint.com/ http://jsonformat.com/ |
In response to A.T.H.K
|
|
That helps... How?
|
In response to Murrawhip
|
|
Murrawhip wrote:
That helps... How? You'd only want a "pretty" version to be able to make it human readable, you don't need pretty for production... Therefore, I gave you a few simple sites that'll make it human readable for your testing. |
I believe he means he wants a json format output for the hub urls, not that the json needs to be pretty.
is that something that already exists? |
They said "pretty-please" not that he wanted pretty json format.
They were hoping for a way to have the format of the hub urls to be json for easy parsing |
In response to Optimumtact
|
|
Optimumtact wrote:
I believe he means he wants a json format output for the hub urls, not that the json needs to be pretty. My mistake, read it wrong obviously. |
Just to make you aware, json_encode() and json_decode() are on the list for 510.
|
Lummox JR resolved issue with message:
To improve communication with browser controls and especially the webclient, JSON now has native support. The two new procs, json_encode() and json_decode(), can be used to convert between BYOND values and JSON. (Please note: Datums are not serialized with json_encode(); they are converted to their text output equivalent.) |