bestiejs / json3

A JSON polyfill. No longer maintained.
https://bestiejs.github.io/json3
Other
1.02k stars 150 forks source link

JSON3 uses a lot of memory in Windows Mobile #53

Closed ssppgit closed 10 years ago

ssppgit commented 10 years ago

Hi!

I am developing a Windows Mobile 6.5 application (not windows phone, windows mobile), and i use a Webview and a lot of JSON object. I had used json2 but i had quite problems with this one.

I found this amazing library which resolves all the problems that i had with json2.

However, this library wastes a lot of memory so in five or six minutes my app haven't memory and throws OutOfMemory. json2 doesn't use so much memory so....is there any reason for this??

Thanks for your answer!

PD: Sorry for my bad english.

ghost commented 10 years ago

Are you calling JSON.parse or JSON.stringify more frequently? If it's .parse(), we might need to look at replacing the recursive descent parser with a validator and eval call, similar to JSON 2.

ssppgit commented 10 years ago

Yes, i call .parse() more frequently...

bnjmnt4n commented 10 years ago

Btw what problems did you encounter with JSON 2?

ssppgit commented 10 years ago

I don't know what it's happen in Windows Mobile but JSON2 doesn't parse well slashs "/", "ñ", and others characters that JSON3 parses well.

bnjmnt4n commented 10 years ago

@ssppgit can you give me an example of usage? For example the string you are trying to parse. Also, what is JSON2's output for that text? Because if we use eval like JSON2, we might encounter the same issues.

bnjmnt4n commented 10 years ago

Closing this for now due to lack of response. @ssppgit feel free to pass along more details; I’ll re-open this issue then.