bcserv / smlib

Function Stock Library for Sourcemod with over 350 new functions
http://www.sourcemodplugins.org
GNU General Public License v3.0
149 stars 88 forks source link

JSON formatting #19

Closed randunel closed 10 years ago

randunel commented 10 years ago

This is a feature request. Can you add a json string formatting function, if it can be done?

Personally, I'm interested in logging all the events with some additional data, and outputting everything as json formatted strings, so they can be read by a web service receiving all the logs.

Later edit: i am aware of the jansson extension, but the extension as dependency would be overkill, because i don't intend to do any parsing in srcds, just something like NativeObject.toJSONString()

berni2288 commented 10 years ago

Hi randunel, if you want a json function in pure Sourcepawn, you can try this one: https://forums.alliedmods.net/showthread.php?t=195557 All I could offer is integrating this in smlib. json encoding is not simple.

randunel commented 10 years ago

Didn't find that one earlier, thanks for the link. Whether you include it in the library or not is your decision. Personally, I don't think json formatting is used too much in plugins.