Board Thread:Support Requests - Getting Technical/@comment-24473195-20150519110317

I'm trying to import a json into lua so that it can be accessible both by javascript and by lua. The JSON module  in mediawiki can import it. But the problem is that wikia's Old scribunto doesn't have any extension to retrieve data from a regular page.

Using frame.preprocess('') can retrieve the page, but it comes up with mediawiki's additional code and parsed text, so the module can't parse it properly. I also tried saving the json data in a page as return {['json']=jsondata} but it fails because mediawiki's parser expects module pages to be syntax error free, and jsondata will only work with a small string.

The last alternative I'm thinking of using, is maybe creating a javascript function that changes the json into a lua table. But that defeats the purpose.

Any ideas? 