Jump to content

json parse unicode


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

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

Recommended Posts

Hello, do you know why lsl is not correctly parsing json ? I just get the raw json without unicode to UTF-8 transformation.

example: 

Quote

statuses[{"created_at":"Wed May 09 21:00:25 +0000 2018","id":994321214742106117,"id_str":"994321214742106117","full_text":"RT @ECiotti: On ne r\u00e9forme pas un pays par de jolis discours, de la communication et de l\u2019esbrouffe. Le pouvoir jupit\u00e9rien de #Macron est u\u2026","truncated":false,"display_text_range":[0,140],"entities":{"hashtags":[{"text":"Macron","indices":[126,133]}],"symbols":[],"user_mentions":[{"screen_name":"ECiotti","name":"Eric Ciotti","id":87886754,"id_str":"87886754","indices":[3,11]}],"urls":[]},"metadata":{"iso_language_code":"fr","result_type":"recent"},"source":"\u003ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003eTwitter for

 

Link to comment
Share on other sites

While LSL has llUnescapeURL, it does not support the "%u####" format, but there are some custom functions found in the notes of that wiki page.

You would still have to manually parse the full_text string for each instance of "\u" and replace them with a Unicode character (using llSubStringIndex, llGetSubStringllDeleteSubString, llInsertString).

  • Thanks 2
Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...