pixelpshr1488303685 Posted May 6, 2011 Share Posted May 6, 2011 Is there any support for JSON serialization in LSL? I'd like to be able to convert an LSL data structure into a JSON string for passing through the llHttpRequest and decode the response from the web site.I've also seen some references to LLSD (Linden Lab Structured Data). That might be usable as an alternative to JSON, the docs say there is a php module for processing it, but I haven't been able to find any reference to its use within LSL. Thanks! Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted May 6, 2011 Share Posted May 6, 2011 I looked at JSON and SL a little while ago - I found this article/implentation helpful. Link to comment Share on other sites More sharing options...
pixelpshr1488303685 Posted May 6, 2011 Author Share Posted May 6, 2011 Thanks for the quick reply! That wiki looks like a good catch. I'll try folding the example code into my app. I noticed that the page is a year old. I guess there wasn't been any movement from the LL side to provide direct support for this in LSL, eh? Thanks again! Link to comment Share on other sites More sharing options...
Void Singer Posted May 6, 2011 Share Posted May 6, 2011 there's no direct support of [ LSL <-> {Anything} ]. there were promises of C# support, but that's been pushed way back... if it arrives before q4 of NEXT year I may die of shock. protocol-wise, we had the beginings of XML/RPC support, but it was never mad scalable, and pretty much abandoned, we have http support sort of... mostly requests, incoming is limited to serving plaintext, although bootstrap methods do exist Link to comment Share on other sites More sharing options...
pixelpshr1488303685 Posted May 6, 2011 Author Share Posted May 6, 2011 Hmmm... I just realized that these scripts only get me half of the way there. They get me from LSL lists to JSON, but not the other way around. Link to comment Share on other sites More sharing options...
pixelpshr1488303685 Posted May 9, 2011 Author Share Posted May 9, 2011 I've found a multitude of JSON parsers in many different languages. That gives me a broad selection of examples to use when implementing my LSL JSON parser. I do have a quick question, though. As an LSL newbie, I haven't worked with the language enough to know what other languages it is most similar to. That information would help me select the most appropriate example to work from. So, what do you think? What other language is the most similar to LSL? Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted May 9, 2011 Share Posted May 9, 2011 Based on a survey of other languages used by LSL scripters: Typonese But seriously - the syntax is similar to the C family of languages but the functions are unique. Data-types are similar to almost any strongly-typed language but lists are, again, unique. My advice is just to select the example you can read most easily so you will understand it best. Link to comment Share on other sites More sharing options...
Aztral Aeon Posted October 12, 2011 Share Posted October 12, 2011 Slightly old post, but why not go from json/p back to lsl list by parsing body from llHTTPRequest ? Link to comment Share on other sites More sharing options...
Void Singer Posted October 12, 2011 Share Posted October 12, 2011 because json text format is not compressed and llHttpRequest if limited to 2kbytes.... and lsl is painfully slow by comparison, you definitely want to parse outside of lsl if possible Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now