English 中文(简体)
JSonLint JSUNLint 失败验证
原标题:JSONLint Failed Validation

我在 Google Maps 中绘制了一些要点, 但有些 JSON 并不正确 。 翻过几个点, 我注意到默认图像不是 弹出 。 Chrome 检查员显示, 无效的 img s 中的 < code> src 属性值没有定义 。 当我通过 JSonsolint 运行 JSON 时, 它在字符串上丢出一个错误 :

" 期待征程、数目、NULL、TRUE、FALSE,{,[ " ;

它说它不是,当它是。 我确定我把别的东西弄坏了, 这就是为什么它没有显示为字符串, 但是是什么? 不知道如何向前测试它。 您可以在这里查看代码 : < href="http://jsfiddle.net/jalbertbowdenii/4Y3JF/" rel="nofool" >http://jsfiddle.net/jalbertbowdenii/4Y3JF/

问题回答

我没有得到JSON校验错误,但JSON的所有项目并非都长于<强>9 ,因此访问 places[i][8] 将在那里失败。

也有长度为 10 的物品, 可在 places[i][9] 中找到 ig- src 。

您可以使用最后一个条目的索引访问 Ing-src:

locations[i][locations[i].length-1]

http://jsfiddle.net/4Y3JF/2/





相关问题
Bind Button.IsEnabled to custom validation with XAML?

I am sorry I didn t know how to title my question any better, you name it if you got a good 1. I have an entity Contact. this person has navigation properties: Address, Phones (A collection of Phone)....

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

Wpf Combobox Limit to List

We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...

Rails 101 | validates_currency?

I ve searched high and low, but I could not find a solution, to what I think seems like a very common task. In a form I want to have a text input that accepts currency strings (i.e. $1,000,000 or ...

CodeIgniter form verification and class

I m using the form validation library and have something like this in the view <p> <label for="NAME">Name <span class="required">*</span></label> <?...

热门标签