JSON Comes to Second Life

JSON is pronounced jay-sun. JSON is a text based way of representing data structures. Some think of it as an alternative to XML. It primarily was developed for use in JavaScript programming for transferring data across a network.

I suspect for many of us the arrival of JSON in the Linden Scripting Language (LSL) is a non-event. But, for scripters it is a big deal.

This week the JSON upgrades will be running on the RC channels, all three. The new stuff added to the LSL is:

  • list llJson2List(string json)
    • Converts the top level of the json string to a list.
  • string llList2Json(string type, list values)
  • string llJsonGetValue(string json, list specifiers)
    • Gets the value indicated by specifiers from the json string.
  • string llJsonSetValue(string json, list specifiers, string value)
    • Returns a new json string that is the json given with the value indicated by specifiers set to value
  • string llJsonValueType(string json, list specifiers)
    • Returns the type constant for the value in json indicated by specifiers.
  • Usage guide: Json_usage_in_LSL (added to Wiki 5/14 – today)

You may have noticed in there the mention of ARRAYS. That is a big thing. I’m not sure it is going to give us arrays as we have with other languages. But, it looks to be closer than the strided lists we use.

Provided this Release Candidate makes it past testing this week another set of JSON features will roll into the RC channels next week. No, no word on what those will be.

Kelly Linden is leading the JSON project. Questions on its implementation can be brought to him at the Tuesday Server & Scripting meetings in Denby.

Kelly says we are seeing JSON added to improve the ability to interface LSL with the larger web. The previous maintenance version expanded the content-type support of http-in and http-out which ties in with this JSON addition.

Second Life News 2013-15 #2

It seems the updates for the Release Candidate planned to rollout on Blue Steel and Le Tigre did not make it. So, the package planned for Magnum was rolled to all three RC regions.

The Magnum package is the HTTP one with a crash mode fix.

So, if you have been testing the new Animation Override functions, you are out of luck for a week or so. The scripts you have made will continue to work. But, compiling (saving) new scripts to test is going to fail.

 

Animation Overrider Scripting Information

Kelly Linden gave us some more information about the new animation functions added to the scripting language.

Kelly said, “The server has supported overriding animations for over a year. The missing piece was the LSL calls and a couple bug fixes. It is expected that once overridden they would continue to be overridden on older servers.”

This means this was something started some time ago. Those old changes have been in place for some time. So, if one overrides an animation in one of the Release Candidate channels, the override should work across ALL servers. It is only the script that has to have the new server code to work. This is the behavior Amber Murfin discovered and commented about.

Kelly also told us the new override functions do not allow setting by UUID. They must be set by a string constant, read that to mean an animation file’s name. The reason for this reveals some possible future plans of the Lab. Kelly says he originally planned to use integer ID’s to handle the state names. But, others in the Lab wanted a more flexible system that would allow additions or changes and possibly and update of the state machine.

Read more

New AO Stuff 2013-14

The new server side of the New Animation Overrider functions is scheduled to roll out to the Blue Steel and Le Tigre Release Wednesday. The only viewer that has added the AO functions, AFAIK, is Niran’s Beta 2.1.6 (2600).

The functions will only work if you are in a Blue Steel or Le Tigre channel region.

As far as I know Niran’s viewer does not have a built in AO. He only added the functions to the script editor. So, you get syntax highlighting. But, you can use the viewer to write test scripts. You just have to be in a Blue Steel or Le Tigre region.

Second Life Scripting Changes

We don’t hear much about changes to the Linden Scripting Language (LSL) these days. But, today is different. We got a bunch of stuff. Exciting stuff!

Server Beta Meeting 2013-12
Server Beta Meeting 2013-12

At the Server Beta meeting Kelly and Maestro Linden were announcing several new changes.

Particles

There are changes coming to the Particle System in Second Life™.  Maestro Linden said, “Alright, so there’s an upcoming server maintenance project, which will probably go to RC next week it has your usual bug fixes, but it also includes goodies for new LSL features.”

Read more

Breaking Second Life AO News

At the Server Beta meeting Kelly and Maestro Linden just announced the addition of two new Linden Scripting Language (LSL) functions that will allow script-less Animation Overriding (AO).

llSetAnimationOverride(“Walking”, “sassywalk”)  – where Walking = default animation state and sassywalk = the animation to use for that state.

llGetAnimationOverride(string anim_state) – Get the name of the animation currently set for state.

More to come…

These will soon be running on the ADITI grid and moving to RC channels…