Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ликбез по JSON
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Dmitry Efimov
February 01, 2018
Programming
94
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ликбез по JSON
Dmitry Efimov
February 01, 2018
More Decks by Dmitry Efimov
See All by Dmitry Efimov
Автоматизируем синхронизацию HTTP API и документации
tuwilof
0
52
Автоматизация Document-Driven Development для проектов с большим API
tuwilof
0
52
Инструменты для обнаружения рассинхронизации реализации “REST” API от документации
tuwilof
0
58
Валидация “REST” API по документации APIB
tuwilof
0
51
Негативное тестирование “REST” API и защита от него
tuwilof
0
350
API Blueprint
tuwilof
0
89
Документирование API
tuwilof
0
200
Почему и как заменить все id на UUID
tuwilof
0
110
Authentication in rails. Monolith vs SPA
tuwilof
0
220
Other Decks in Programming
See All in Programming
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
AmebaブログはKMPから卒業します
kmars0605
0
190
Railsバージョンを4倍にした話
optim
0
350
R8 の設定見直しでアプリサイズ削減
andpad
0
220
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
460
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
残高管理から台帳サービスへの進化
artoy
1
200
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Code Reviewing Like a Champion
maltzj
529
40k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Tell your own story through comics
letsgokoyo
1
1.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
We Are The Robots
honzajavorek
0
400
Transcript
Ликбез по JSON
JavaScript Object Notation
основанный на существующих конструкциях языка JavaScript, как облегчённую альтернативу XML
Douglas Crockford
None
None
None
None
None
None
иначе это уже не JSON
где используют JSON?
None
есть же готовые клиенты и сервера
None
негативные кейсы
какие бывают инструменты?
конверторы
редакторы
автоформатирование
diff
валидация
что-то забыли?
православный JSON
None
None
предположим мы хотим написать свой валидатор по TDD
None
невалидно
“”
невалидно
как выглядит самый небольшой пример валидного JSON?
[] и {}
[ [], {} ]
валидно
{ to: “session”, do: “test”, text: “Hello world” }
невалидно
{ ‘to’: “session”, ‘do’: “test”, ‘text’: “Hello world” }
все еще не валидно
{ “to": “session”, “do”: “test”, “text”: “Hello world” }
валидно
{ "name": "Dmitry", "name": "Dima" }
невалидно
далее все валидно
{ "dogecoin": 0.00001, "message": "gift" }
{ "dogecoin": -1, "message": "gift" }
{ "dogecoin": 1000000000000000000000000000000000 000000000000000000000000000000000, "message": "gift" }
{ "dogecoin": 3.7e-5, "message": "gift" }
{ "dogecoin": 6.02e23, "message": "gift" }
вопрос 1: можно ли конвертировать в hash невалидный JSON?
да
вопрос 2: все ли используют валидатор перед конвертацией в hash?
None
доклад от создателя https://www.youtube.com/watch?v=-C-JoyNuQJs diff http://www.jsondiff.com онлайн валидаторы https://jsonlint.com ttps://jsonformatter.curiousconcept.com/
rfc https://tools.ietf.org/html/rfc8259