Jump to content

JSON encode and decode?


You are about to reply to a thread that has been inactive for 4007 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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

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

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

  • 5 months later...
You are about to reply to a thread that has been inactive for 4007 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...