Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
private string BASE_URL = "http://localhost:24491/ServiceProduct.svc/";
        public List<Product> findall()
            try {
                var wc = new WebClient();
                var json = wc.DownloadString(BASE_URL + "findall");
                var js = new JavaScriptSerializer();
                return js.Deserialize<List <Product>>(json);
            catch (Exception ex)
                throw ex;

What I have tried:

Invalid JSON primitive: .
sajeetharan 1-Sep-18 4:51am    
which means you are not getting a valid JSON
Member 10480886 2-Sep-18 12:15pm    
How to resolved it..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900