JsonStream class is crashing

Monkey Forums/Monkey Bug Reports/JsonStream class is crashing

Rushino(Posted 2012) [#1]
Hey Mark,

I know its not an official module yet (probably) but i am using the JsonStream class from the Monkey bananas folder on version 65 and the JsonStream class seem to say that my Json is not valid. Do you have an idea why ?

Here the json: {"ID":3,"Message":"VGhpcyBpcyBhIHNhbXBsZSBtZXNzYWdl"}

I am using this code :

Local obj:= stream.ReadObject()
Local t:Testing = Testing(obj)

Class Testing
Field id:Int
Field message:String
End

Thanks!


marksibly(Posted 2012) [#2]
Case issues?

Can you post a runnable sample?


Rushino(Posted 2012) [#3]
Here a demo.. http://www.mediafire.com/?v1o52c8cnp7bnfs


Rushino(Posted 2012) [#4]
Any update regarding this ?


MikeHart(Posted 2012) [#5]
If you need a different JSON module, chekc out google code. There are a lot of modules there and I think 1 or 2 for JSON. Personally I use the one from Damian Sinclair. Works good so far.


Rushino(Posted 2012) [#6]
Oh yeah true i didn't though about that. I can simply get one in javascript from somewhere. However i will be started to be constraint of using only HTML 5. But i think that probably what gonna be the case...

Thanks for the idea!


MikeHart(Posted 2012) [#7]
Its a monkey module I was talking about.


marksibly(Posted 2012) [#8]
Couldn't try this 'coz it included a bunch of 3rd party modules.

Anyway, the json stream in bananas isn't very well tested, so I'd also recommend using Damian Sinclairs.


Rushino(Posted 2012) [#9]
Oh i didn't seen it was written in Monkey actually. Interesting! Will have a look :)

Thanks!