Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
71
AWS re:Invent 2019 / Hackathon for Good 参加録
edwardkenfox
2
510
Repro basketball club
edwardkenfox
0
220
Introduction to UX Optimizer
edwardkenfox
0
83
フロントエンド開発の落とし穴 / Fallacies of Client Side Programming (2019ver)
edwardkenfox
0
260
クライアントサイド開発の落とし穴 / Fallacies of Client Side Programming
edwardkenfox
0
350
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
Entra ID の基礎(Japan Microsoft 365 コミュニティ カンファレンス 2024)
murachiakira
3
2.3k
農業用ダム監視を目的とした衛星SAR 干渉解析の適用性について
osgeojp
0
120
12/3(火)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #2 with AWS Heroes)
minorun365
PRO
4
120
12/4(水)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #3 with AWS Heroes)
minorun365
PRO
2
330
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
2
1k
Reliability Engineering at Studist
katsuhisa91
PRO
0
100
[DevFestTokyo]Accelerating Flutter App Development Using Generative AI
korodroid
1
130
【CNDW2024】SIerで200人クラウドネイティブのファンを増やした話
yuta1979
1
310
Oracle Cloud Infrastructure:2024年11月度サービス・アップデート
oracle4engineer
PRO
0
160
実践/先取り「入門 Kubernetes Validating/Mutating Admission Policy」 / CloudNative Days Winter 2024
pfn
PRO
1
150
プロダクトの爆速開発を支える、 「作らない・削る・尖らせる」技術
applism118
5
2.6k
検証と資産化を形にするプロダクト組織へ/tapple_pmconf2024
corin8823
1
4.3k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
How GitHub (no longer) Works
holman
310
140k
Typedesign – Prime Four
hannesfritz
40
2.4k
A Tale of Four Properties
chriscoyier
156
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Six Lessons from altMBA
skipperchong
27
3.5k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Building Your Own Lightsaber
phodgson
103
6.1k
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