Disclaimer, Obviously as the developer of JsonConfig & Graph, I am strongly in favor of Json capabilities in Lua. That being said, would the new Lua functions be any more in danger of misuse than the powerful raw HTML generation library, or the capability of pulling content of may pages in a list (both of which are already available in Lua), e.g. for page in list_of_pages: mw.getContent(page)
I feel that most powerful functions could be abused, and at the end of the day, there is no such thing as a perfect "idiot-proof" way, simply because there are a lot of brilliant idiots. So instead of prohibiting a function that is clearly demanded by many developers, let us implement it and rely on 1) performance tuning once we see a problem, 2) usage/code reviewing, 3) documenting recommended usage patterns.
On Tue, Nov 4, 2014 at 3:45 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
There's a long-standing request for Scribunto to provide library functions for JSON encoding and decoding.
The advantage of this would be improved interoperability with the growing number of extensions that use JSON (e.g. JsonConfig, Graph).
The disadvantages include:
- People may store data in JSON blobs that must be parsed where a module
using mw.loadData would be more appropriate.
- People may write templates that attempt to bypass the normal MediaWiki
parameter handling mechanism in favor of passing a JSON blob, which would likely lead to page wikitext that is harder for end users to understand.
So, let's discuss it: do the advantages outweigh the potential disadvantages? Are there additional advantages or disadvantages not yet mentioned?
-- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l