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
130
僕と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
700
Lambda@Edgeを利用したサードパーティJavaScriptのカナリアリリース / Canary release using Lamdba@Edge
edwardkenfox
0
89
AWS re:Invent 2019 / Hackathon for Good 参加録
edwardkenfox
2
570
Repro basketball club
edwardkenfox
0
240
Introduction to UX Optimizer
edwardkenfox
0
98
フロントエンド開発の落とし穴 / Fallacies of Client Side Programming (2019ver)
edwardkenfox
0
310
クライアントサイド開発の落とし穴 / Fallacies of Client Side Programming
edwardkenfox
0
430
Beacon API ことはじめ 〜そしてkeepalive fetchへ〜 / Beacon API The Basics
edwardkenfox
0
1.1k
window.windowとは何か / What is window window
edwardkenfox
1
220
Other Decks in Technology
See All in Technology
KubeCon + CloudNativeCon Japan 2025 Recap
ren510dev
1
380
Getting to Know Your Legacy (System) with AI-Driven Software Archeology (WeAreDevelopers World Congress 2025)
feststelltaste
1
130
Should Our Project Join the CNCF? (Japanese Recap)
whywaita
PRO
0
340
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.7k
PO初心者が考えた ”POらしさ”
nb_rady
0
210
Delta airlines Customer®️ USA Contact Numbers: Complete 2025 Support Guide
deltahelp
0
700
敢えて生成AIを使わないマネジメント業務
kzkmaeda
2
440
ビズリーチが挑む メトリクスを活用した技術的負債の解消 / dev-productivity-con2025
visional_engineering_and_design
3
7.6k
無意味な開発生産性の議論から抜け出すための予兆検知とお金とAI
i35_267
4
13k
MUITにおける開発プロセスモダナイズの取り組みと開発生産性可視化の取り組みについて / Modernize the Development Process and Visualize Development Productivity at MUIT
muit
1
16k
What’s new in Android development tools
yanzm
0
310
Claude Code に プロジェクト管理やらせたみた
unson
6
4k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Visualization
eitanlees
146
16k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Writing Fast Ruby
sferik
628
62k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
690
What's in a price? How to price your products and services
michaelherold
246
12k
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