as3corelib icon indicating copy to clipboard operation
as3corelib copied to clipboard

JSONParseError: Unexpected c encountered

Open darronschall opened this issue 15 years ago • 0 comments

Originally filed by sandlerg on 2010-02-23T13:43:34

What steps will reproduce the problem?

  1. I am passing JSON from flashvars to an as3 flash file
  2. HTML code:
  3. AS3 code: import com.adobe.serialization.json.JSON ccbtn.addEventListener( MouseEvent.CLICK, handleMouseClick); function handleMouseClick (event:MouseEvent):void { var params:String = stage.loaderInfo.parameters.params; //pass in JSON var paramsData:String = JSON.decode(params); //decode the JSON string textBox.text = paramsData; //write output to text box on button click }
  4. What is the expected output? What do you see instead? I am expecting to parse out the JSON string in as3. Instead, I am getting
  5. What version of the product are you using? On what operating system? Flash 10 file, as3

Please provide any additional information below. I am quite new to this, so please go easy on me.

darronschall avatar Jul 28 '10 20:07 darronschall