I think you must encapsulate "false" and numbers in quotes... and treat msg like an object (msg.descrizione, msg. disponibile... etc.)
On 18 nov, 17:43, sportfantasy <luca.santanie...@email.it> wrote: > Hi, > > I'm italian developer. I have a problem. I develope my simple web > application using jquery for ajax call. > > My Servlet return json string generated with json-lib... for example: > {"descrizione":"Questa è la descrizione del > computer","disponibile":false,"id":1,"nome":"Computer","prezzo": > 123.456} > > My jsp page contains a simple nutton that call follow js function: > > $.ajax({ > url: "json?method=prodotti", > global: false, > type: "POST", > dataType: "json", > success: function(msg){ > alert(msg); > > } > }); > > Application run correcty... > > Only problem is mozilla/firefox browser... In js console appears this > message: > > Errore: non well-formed > File sorgente: ... > Riga: 1, Colonna: 1 > Codice sorgente: > {"descrizione":"Questa ? la descrizione del > computer","disponibile":false,"id":1,"nome":"Computer","prezzo": > 123.456} > > Why? How can I solve it? > > Sorry for my english. I hope solve my problem > > Thanks > > Luca