Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
僕とprototypeとJSONで / Me and prototype down by th...
Search
Edward Fox
December 20, 2018
Technology
0
110
僕とprototypeとJSONで / Me and prototype down by the JSON
2018/12/20 We Are JavaScripters! @27th
https://wajs.connpass.com/event/111736/
Edward Fox
December 20, 2018
Tweet
Share
More Decks by Edward Fox
See All by Edward Fox
Priorityを制するものはローディングを制す
edwardkenfox
4
590
Lambda@Edgeを利用したサードパーティJavaScriptのカナリアリリース / Canary release using Lamdba@Edge
edwardkenfox
0
72
AWS re:Invent 2019 / Hackathon for Good 参加録
edwardkenfox
2
520
Repro basketball club
edwardkenfox
0
220
Introduction to UX Optimizer
edwardkenfox
0
85
フロントエンド開発の落とし穴 / Fallacies of Client Side Programming (2019ver)
edwardkenfox
0
270
クライアントサイド開発の落とし穴 / Fallacies of Client Side Programming
edwardkenfox
0
360
Beacon API ことはじめ 〜そしてkeepalive fetchへ〜 / Beacon API The Basics
edwardkenfox
0
1k
window.windowとは何か / What is window window
edwardkenfox
1
190
Other Decks in Technology
See All in Technology
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
100
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
180
Password-less Journey - パスキーへの移行を見据えたユーザーの準備 @ AXIES 2024
ritou
3
1.4k
5分でわかるDuckDB
chanyou0311
10
3.2k
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
250
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
210
C++26 エラー性動作
faithandbrave
2
680
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
Wantedly での Datadog 活用事例
bgpat
1
410
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
66
4.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Producing Creativity
orderedlist
PRO
341
39k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Docker and Python
trallard
41
3.1k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Transcript
ͱprototypeͱJSONͰ Edward Fox 2018/12/20 @We Are JavaScripters! #27
@edwardkenfox Edward Fox ɾWEBΤϯδχΞ @ Reproגࣜձࣾ ɾWEBʗϒϥβٕज़શൠɺPWA ɾΫϥϑτϏʔϧɺԻָɺόεέ
https://pmctvline2.files.wordpress.com/2014/04/friday-the-13th-dw.jpg ࠓJSONͷා͍͠·͢ ʢ࣮Ͱ͢ʣ
ීஈͷۀ = ReproͷWeb SDKͷ։ൃ + อक = ৭ʑͳαΠτͰಈ͘ίʔυΛॻ͘
৭ʑͳαΠτͰಈ͘ ίʔυΛॻ͍͍ͯΔͱ ࣌ʹحոͳ໘ʹૺ۰͠·͢
ͱΓ͋͑ͣݟ͍ͯͩ͘͞
2008ʹ։ઃ͞Εͨ ϑΝογϣϯܥECαΠτ
ΠέͯΔαΠτ ΠέͯΔϑϨʔϜϫʔΫΛ͏
2008࣌࠷ΠέͯΔ ϑϨʔϜϫʔΫ = prototype.js ʢҟೝΊ·͢ʣ
http://prototypejs.org
ΦϒδΣΫτͷϓϩτλΠϓʹ উखʹ ྑ͍ײ͡ʹؔΛੜͯ͠ ྑ͍ײ͡ͷAPIΛఏڙͯ͘͠ΕΔ
͡Ό͋Ұମ prototype.js ͕ ͳʹΛͨͬͯ͠ݴ͏Μͩʂ
͜͜ͰҰ୴ JSONͷ༷ΛݟͯΈ·͠ΐ͏
https://www.ecma-international.org/ecma-262/5.1/
https://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify > If the value has a toJSON() method, it's
responsible to define what data will be serialized.
Α͏͢Δʹ
JSONͷதͰvalueͱͳ͍ͬͯΔ ΦϒδΣΫτʹ toJSON ͱ͍͏ ͕ؔੜ͑ͯΕ ͦΕΛͬͯγϦΞϥΠζ͢Δ
prototype.js ʹͬͯݟͯΈΔͱ
Array.prototype ʹ ຊདྷଘࡏ͠ͳ͍ toJSONΛੜ͍ͯ͠Δʂ
͔͠ όάͬͯΔʂ
ͦͯ͠ ͏ͪͷJS͕ר͖ࠐ·ΕΔʂ⚰⚰⚰
ແࣄࢮ
None
※ 1.6.0.3 (= 2008ࠒ) લޙͷ όʔδϣϯͰ͔͠ى͖ͳ͍Ͱ͢
མͪண͍ͯݕূ
None
ਖ਼ৗಈ࡞
None
!?
ೋॏʹจࣈྻԽ
None
Array ʹ toJSON Λੜ͢ͱ ݁ՌΛ্ॻ͖Ͱ͖ͨʂ
ා͍ɺ https://www.youtube.com/watch?v=qozKDT5bYlA
WE ARE HIRING!
i
Fin