[slscripters] JSON Serialization

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[slscripters] JSON Serialization

Bunny Halberd-2
Hi Ya'll!

Has anyone written an LSL-based JSON serialization / deserialization engine they're willing to share? :)

- Bunny
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] JSON Serialization

Kuraiko Yoshikawa
If you wait a bit then you can use LSLs new JSON functions.
At the moment they are on the magnum, letigre and bluesteel test servers.

See the latest release note:
New Features
  • Added support LSL functions for manipulating JSON data
    • 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.

http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/13#13.05.14.275813


Usage guide: http://wiki.secondlife.com/wiki/Json_usage_in_LSL

Regards,
Kuraiko



On 16.05.2013 16:12, Bunny Mickley wrote:
Hi Ya'll!

Has anyone written an LSL-based JSON serialization / deserialization engine they're willing to share? :)

- Bunny
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] JSON Serialization

Kelly Linden
Do note that it is currently in RC and testing and there are some bugs. The biggest one right now is that keys in objects are not being quoted - and if quoted keys are passed in the json the quotes end up being part of the key. This will be fixed.

 - Kelly

Kelly Washington | Senior Software Engineer, Second Life Server


On Thu, May 16, 2013 at 7:22 AM, Kuraiko Yoshikawa <[hidden email]> wrote:
If you wait a bit then you can use LSLs new JSON functions.
At the moment they are on the magnum, letigre and bluesteel test servers.

See the latest release note:
New Features
  • Added support LSL functions for manipulating JSON data
    • 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.

http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/13#13.05.14.275813


Usage guide: http://wiki.secondlife.com/wiki/Json_usage_in_LSL

Regards,
Kuraiko



On 16.05.2013 16:12, Bunny Mickley wrote:
Hi Ya'll!

Has anyone written an LSL-based JSON serialization / deserialization engine they're willing to share? :)

- Bunny
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] JSON Serialization

Kelly Linden
There's a new build on the beta grid (aditi) at secondlife://Aditi/secondlife/Lexicolo/131/181/43 , currently at channel DRTSIM-207 . This version includes the following fixes:
  • '\"', '\n', '\t', '/' within LSL strings are now generally escaped when entering json strings
    • these substrings are unescaped when converted back to LSL strings
    • one exception is when the string begins with '\"' - in that case, the string is copied without any additional formatting, under the assumption that it is already a pre-escaped json string.
  • keys should always be returned quoted, and the script generally expects keys from input to be quoted

We are hoping to have these changes on RC this week.

 - Kelly


On Thu, May 16, 2013 at 8:45 AM, Kelly Linden <[hidden email]> wrote:
Do note that it is currently in RC and testing and there are some bugs. The biggest one right now is that keys in objects are not being quoted - and if quoted keys are passed in the json the quotes end up being part of the key. This will be fixed.

 - Kelly

On Thu, May 16, 2013 at 7:22 AM, Kuraiko Yoshikawa <[hidden email]> wrote:
If you wait a bit then you can use LSLs new JSON functions.
At the moment they are on the magnum, letigre and bluesteel test servers.

See the latest release note:
New Features
  • Added support LSL functions for manipulating JSON data
    • 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.

http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/13#13.05.14.275813


Usage guide: http://wiki.secondlife.com/wiki/Json_usage_in_LSL

Regards,
Kuraiko



On 16.05.2013 16:12, Bunny Mickley wrote:
Hi Ya'll!

Has anyone written an LSL-based JSON serialization / deserialization engine they're willing to share? :)

- Bunny
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters




_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] JSON Serialization

Marc Adored
w00! Thank you very much Kelly! I have been waiting for this forever!


On Mon, May 20, 2013 at 6:14 PM, Kelly Linden <[hidden email]> wrote:
There's a new build on the beta grid (aditi) at secondlife://Aditi/secondlife/Lexicolo/131/181/43 , currently at channel DRTSIM-207 . This version includes the following fixes:
  • '\"', '\n', '\t', '/' within LSL strings are now generally escaped when entering json strings
    • these substrings are unescaped when converted back to LSL strings
    • one exception is when the string begins with '\"' - in that case, the string is copied without any additional formatting, under the assumption that it is already a pre-escaped json string.
  • keys should always be returned quoted, and the script generally expects keys from input to be quoted

We are hoping to have these changes on RC this week.

 - Kelly


On Thu, May 16, 2013 at 8:45 AM, Kelly Linden <[hidden email]> wrote:
Do note that it is currently in RC and testing and there are some bugs. The biggest one right now is that keys in objects are not being quoted - and if quoted keys are passed in the json the quotes end up being part of the key. This will be fixed.

 - Kelly

On Thu, May 16, 2013 at 7:22 AM, Kuraiko Yoshikawa <[hidden email]> wrote:
If you wait a bit then you can use LSLs new JSON functions.
At the moment they are on the magnum, letigre and bluesteel test servers.

See the latest release note:
New Features
  • Added support LSL functions for manipulating JSON data
    • 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.

http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/13#13.05.14.275813


Usage guide: http://wiki.secondlife.com/wiki/Json_usage_in_LSL

Regards,
Kuraiko



On 16.05.2013 16:12, Bunny Mickley wrote:
Hi Ya'll!

Has anyone written an LSL-based JSON serialization / deserialization engine they're willing to share? :)

- Bunny
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters




_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters