僕とprototypeとJSONで / Me and prototype down by the JSON

D32564792887e3fb5955021f9804c0a6?s=47 Edward Fox
December 20, 2018

僕とprototypeとJSONで / Me and prototype down by the JSON

2018/12/20 We Are JavaScripters! @27th

https://wajs.connpass.com/event/111736/

D32564792887e3fb5955021f9804c0a6?s=128

Edward Fox

December 20, 2018
Tweet

Transcript

  1. ๻ͱprototypeͱJSONͰ Edward Fox 2018/12/20 @We Are JavaScripters! #27

  2. @edwardkenfox Edward Fox ɾWEBΤϯδχΞ @ Reproגࣜձࣾ ɾWEBʗϒϥ΢βٕज़શൠɺPWA ɾΫϥϑτϏʔϧɺԻָɺόεέ

  3. https://pmctvline2.files.wordpress.com/2014/04/friday-the-13th-dw.jpg ࠓ೔͸JSONͷා͍࿩͠·͢ ʢ࣮࿩Ͱ͢ʣ

  4. ීஈͷۀ຿ = ReproͷWeb SDKͷ։ൃ + อक = ৭ʑͳαΠτͰಈ͘ίʔυΛॻ͘

  5. ৭ʑͳαΠτͰಈ͘ ίʔυΛॻ͍͍ͯΔͱ ࣌ʹحոͳ৔໘ʹૺ۰͠·͢

  6. ͱΓ͋͑ͣݟ͍ͯͩ͘͞

  7. 2008೥ʹ։ઃ͞Εͨ ϑΝογϣϯܥECαΠτ

  8. ΠέͯΔαΠτ͸ ΠέͯΔϑϨʔϜϫʔΫΛ࢖͏

  9. 2008೥౰࣌࠷΋ΠέͯΔ ϑϨʔϜϫʔΫ = prototype.js
 ʢҟ࿦͸ೝΊ·͢ʣ

  10. http://prototypejs.org

  11. ΦϒδΣΫτͷϓϩτλΠϓʹ উखʹ ྑ͍ײ͡ʹؔ਺Λੜ΍ͯ͠ ྑ͍ײ͡ͷAPIΛఏڙͯ͘͠ΕΔ

  12. ͡Ό͋Ұମ prototype.js ͕ ͳʹΛͨͬͯ͠ݴ͏Μͩʂ

  13. ͜͜ͰҰ୴ JSONͷ࢓༷ΛݟͯΈ·͠ΐ͏

  14. https://www.ecma-international.org/ecma-262/5.1/

  15. https://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3

  16. 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.
  17. Α͏͢Δʹ

  18. JSONͷதͰvalueͱͳ͍ͬͯΔ ΦϒδΣΫτʹ toJSON ͱ͍͏ ؔ਺͕ੜ͑ͯΕ͹ ͦΕΛ࢖ͬͯγϦΞϥΠζ͢Δ

  19. prototype.js ʹ໭ͬͯݟͯΈΔͱ

  20. Array.prototype ʹ ຊདྷ͸ଘࡏ͠ͳ͍ toJSONΛੜ΍͍ͯ͠Δʂ

  21. ͔͠΋ όάͬͯΔʂ

  22. ͦͯ͠ ͏ͪͷJS͕ר͖ࠐ·ΕΔʂ⚰⚰⚰

  23. ແࣄࢮ๢

  24. None
  25. ※ 1.6.0.3 (= 2008೥ࠒ) લޙͷ όʔδϣϯͰ͔͠ى͖ͳ͍Ͱ͢

  26. མͪண͍ͯݕূ

  27. None
  28. ਖ਼ৗಈ࡞

  29. None
  30. !?

  31. ೋॏʹจࣈྻԽ

  32. None
  33. Array ʹ toJSON Λੜ΍͢ͱ ݁ՌΛ্ॻ͖Ͱ͖ͨʂ

  34. ා͍࿩ɺ׬ https://www.youtube.com/watch?v=qozKDT5bYlA

  35. WE ARE HIRING!

  36. i

  37. Fin