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
160
僕と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
780
Lambda@Edgeを利用したサードパーティJavaScriptのカナリアリリース / Canary release using Lamdba@Edge
edwardkenfox
0
120
AWS re:Invent 2019 / Hackathon for Good 参加録
edwardkenfox
2
600
Repro basketball club
edwardkenfox
0
260
Introduction to UX Optimizer
edwardkenfox
0
120
フロントエンド開発の落とし穴 / Fallacies of Client Side Programming (2019ver)
edwardkenfox
0
340
クライアントサイド開発の落とし穴 / Fallacies of Client Side Programming
edwardkenfox
0
490
Beacon API ことはじめ 〜そしてkeepalive fetchへ〜 / Beacon API The Basics
edwardkenfox
0
1.2k
window.windowとは何か / What is window window
edwardkenfox
1
240
Other Decks in Technology
See All in Technology
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.5k
Tebiki Engineering Team Deck
tebiki
0
24k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
17k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
420
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
450
Red Hat OpenStack Services on OpenShift
tamemiya
0
110
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
360
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
140
AI駆動PjMの理想像 と現在地 -実践例を添えて-
masahiro_okamura
1
110
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
110
Context Engineeringの取り組み
nutslove
0
350
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
WENDY [Excerpt]
tessaabrams
9
36k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
Marketing to machines
jonoalderson
1
4.6k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Fireside Chat
paigeccino
41
3.8k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
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