ChrisFulstow / NBlog

A lightweight blog engine built with ASP.NET MVC 3, Razor, jQuery and C#.
283 stars 139 forks source link

Unexpected character encountered while parsing value: . Path '', line 0, position 0. #25

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi, a have a valid json file. But in this error is a problem

        if (!(typeof(TEntity) == typeof(Image)))
        {
            string json = blob.DownloadText();
            item = JsonConvert.DeserializeObject<TEntity>(json);
        }

validation. Is there possible solving this ?

relkins commented 9 years ago

I had this problem - it turns out there were a bunch of hidden characters that didn't show up when I opened the file in something like notepad but were being served in the file delivered by blob storage. Set your container to be publically accessible and hit the URL for your settings.json file - my guess is you'll see it come back with a bunch of weird characters that didn't show up before.

The solution would be to cut the text from your file and paste in into a BRAND NEW text file, then upload that.

taozifly commented 7 years ago

这里的问题 估计是 blob对象问题,你要确定blob对象是一个可序列化的对象,你可以监视blob对象