So, I've opened up jsonlint.com
which will tell us whether or
not this JSON is in the right format.
Go ahead and copy this object
in just using the curly braces.
I don't need to copy var education.
Paste it in and click Validate.
And scrolling down we can see that
this is, in face, a valid JSON.
>> What if there were errors?
Like what if we erase this comma,
right here?
>> Well, JSONLint would tell us where
the error is, which is a big help.
Let's see, I'll come over here, I'll
delete this comma, and click Validate.
And we can see that there's an error
on Line 11 because we forgot the comma
that comes before it.
The good news is that text editors like
Sublime Text also highlight errors and
help us figure out where
our syntax went wrong.
إذن، فتحت jsonlint.com
الذي سيخبرنا إذا ما كان
.JSON بتنسيق صحيح أم لا
تابعوا وانسخوا هذا الكائن
.باستخدام الأقواس المعقوصة فقط
.لا أحتاج إلى نسخ var education
.والصقوه ثم انقروا فوق Validate
وبالتمرير لأسفل يمكننا أن نرى بأن
.هذا في الحقيقة JSON صالح
>> ماذا لو كانت هناك أخطاء؟
،كما لو مسحنا هذه الفاصلة
هنا؟
>> حسنًا، سيخبرنا JSONLint بمكان
.الخطأ، وهو مساعدة كبيرة
دعونا نرى، سآتي هنا، وسأحذف
.هذه الفاصلة، ثم أنقر فوق Validate
ويمكننا أن نرى بأن هناك خطأ
في Line 11 لأننا نسينا الفاصلة
.التي تأتي قبله
والأخبار الجديدة هي أن محررات النص مثل
Sublime Textيميز الأخطاء
ويساعدنا على اكتشاف
.الأخطاء في الصيغة
JSON이 올바른 형식인지 알려줄
jsonlint.com을 열었어요
객체를 처음 중괄호부터 마지막 중괄호까지 복사할게요
var education은 복사하지 않아도 돼요
붙여 넣고 Validate을 누르세요
아래로 내려보면
올바른 JSON이라고 나오네요
오류가 있다면 어떻게 나타날까요?
이 콤마를 지워봅시다
Jsonlint는 오류가 어디 있는지 알려줄 거예요
아주 유용하죠
콤마를 지우고 Validate을 눌러보겠습니다
11번째 줄에 오류가 있다고 하네요
Sublime Text 같은 에디터도
어떤 문법이 잘못되었는지 알려줄 겁니다
Abri jsonlint.com,
que nos informa se este JSON
está ou não no formato certo.
Copie este objeto,
apenas o que está dentro das chaves.
Não preciso copiar var education.
Cole-o e clique em Validate.
Rolando para baixo, podemos ver que
este é um JSON válido.
E se houvesse erros?
Por exemplo, e se apagássemos esta vírgula,
bem aqui?
Bem, JSONLint nos diria onde
os erros estão, o que é uma grande ajuda.
Devo chegar,
excluir esta vírgula
e clicar em Validate.
E podemos ver que há um erro
na Linha 11
porque esquecemos a vírgula
que vem antes.
A boa notícia é que os editores de texto,
como o Sublime Text,
também destacam erros e
nos ajudam a descobrir
onde nossa sintaxe deu errado.
来验证 JSON 格式是否正确
复制花括号及其中内容
不要复制 var education 的部分
粘贴到网页并点击验证
下拉看到这是一个符合规范的 JSON
如果存在错误会怎么样
比如删掉这些逗号?
JSONLint 会为我们指出出错的地方
来试试删掉逗号 点击验证
可以看到第十一行的错误提示
正是删除逗号造成的
好消息是像 Sublime Text 这样的编辑器会对错误高亮显示
帮助我们找到句法有错的地方