Hi all, Well now i have a small problem which is that the following JSON string gives a "Badly formed JSON string" exception. <code> ''{"succes":true,"message":"+------------------------------------------------------------------------ +<br>\n| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a05314\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0||\u00a0Datum \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|\u00a027-06-2007\u00a0|<br>\n| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0CV \u00a0nummer:\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|| \u00a0geplaatst:\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <br>\n|--------------------------------+------------++------------ +------------|<br>\n|\u00a0Provincie: \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0Overijssel\u00a0||\u00a0Datum \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <br>\n| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|| \u00a0gewijzigd:\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <br>\n +------------------------------------------------------------------------ +<br>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0Account \u00a0Manager<br>\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0* \u00a0Persoonlijke\u00a0gegevens<br>\n\u00a0Geslacht:\u00a0m<br> \nGeboortedatum:\u00a017-10-1963<br>\n*\u00a0Deze\u00a0kandidaat \u00a0heeft\u00a0haar\u00a0CV\u00a0anoniem\u00a0ingevuld.<br>\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0CV \u00a0gegevens<br>\n\u00a0CV\u00a0nummer:<br>\n5314<br>\n \u00a0Regio:<br>\nOverijssel<br>\n\u00a0Huidige\u00a0functie:<br> \nZelfstandig<br>\n\u00a0Huidige\u00a0werkgever:<br>\nPol<br>\n \u00a0Werkervaring:<br>\nHeel\u00a0veel<br>\n\u00a0Opleiding:<br>\nHBO \u00a0Informatica,\u00a0MCSE,\u00a0ITIL,\u00a0Prince2,\u00a0AMBI<br>\n \u00a0Salariswensen:<br>\n5500<br>\n\u00a0Overige\u00a0informatie:<br> \ngeen<br>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0* \u00a0Matchinstellingen<br>\n\u00a0Huidige\u00a0functiegroep(en):<br> \nAutomatisering\/ICT<br>\n\u00a0Gewenste\u00a0functiegroep:<br> \nAutomatisering\/ICT<br>\n\u00a0Huidige\u00a0branche(s):<br> \n(Zakelijke)\u00a0dienstverlening<br>\n\u00a0Gewenste \u00a0branche:<br>\n(Zakelijke)\u00a0dienstverlening<br>\n\u00a0Huidige \u00a0provincie:<br>\nOverijssel<br>\nGewenste\u00a0provincie:<br> \nDrenthe<br>\nFriesland<br>\nGroningen<br>\nOverijssel<br>\n\u00a0<br> \n\u00a0<br>\n\u00a0<br>\n\u00a0"}'' </code> I validated the string using http://www.jsonlint.com/ and there it is all valid. Is anyone familiar with this problem? and do you know a fix? Thanks already, Warnar P.s. I''m using version 1.6.0.2 of prototype --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Warstar
2008-May-13 10:11 UTC
Re: evalJSON gives "Badly formed JSON string" some help please
Okee leave it found the fix is was removing the "\n" from the string. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---