+ Start a Discussion
Nishad BashaNishad Basha 

how to serialize the objects in to json string format using visualforce page?

iam using this example so far: http://www.sandeeparora.org/2014/10/example-serialize-objects-into-json-strings-in-apex/
iam getting error like: AccountJSON Compile Error: line breaks not allowed in string literals at line 16 column -1
How to solve the above solution please give me some ideas.
KaranrajKaranraj
Nishad - Make sure to keep the SOQL query in a single line
String soql = 'SELECT Name,AccountNumber,site,AccountSource, AnnualRevenue,BillingAddress, Fax,Phone, Website,TickerSymbol, NumberofEmployees, Ownership, SIC FROM Account WHERE name = :AccountSelected LIMIT 1';