Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JSONをパースする.pdf

489c8b0a930ed88ad275345d7476b945?s=47 ooooooo_q
September 15, 2019

 JSONをパースする.pdf

489c8b0a930ed88ad275345d7476b945?s=128

ooooooo_q

September 15, 2019
Tweet

More Decks by ooooooo_q

Other Decks in Programming

Transcript

  1. +40/Λ ҆શʹύʔε͢Δ +40/೔ͷ༵ۚ೔ !PPPPPPP@R 1

  2. 3VCZҎ֎ͷ࿩΋ॻ͜͏ͱࢥͬͯͨͷʹ ͍ͭͷؒʹ͔͕࣌ؒͳ͘ͳͬͨͷͰ ࠓճ͸3VCZͷ࿩ͷΈͰ͢ 2

  3. 36#:Ͱ+40/Λ҆શʹύʔε͢Δʹ͸ʁ ඪ४ͷ+40/QBSTFΛ࢖͏ 3

  4. +40/1"34& 4

  5. ऴΘΓ 5

  6. ΋ͬͱৄ͘͠ 6

  7. JSON ✦ +40/ϥΠϒϥϦͷͳ͔ʹύʔε͢Δؔ਺͸͍͔ͭ͋͘Δ ✦ IUUQTEPDTSVCZMBOHPSHKBMBUFTUDMBTT+40/IUNM 7

  8. JSON.LOAD ✦ 3VCZͷMPBEʹϢʔβೖྗΛೖΕΔͱةݥ ✦ .BSTIBMMPBEͱ͔:".-MPBE ✦ +40/Ͱ͸ ✦ TFMGKTPO@DSFBUF͕એݴ͞ΕͨΫϥεͷΈ࡞ΕΔ ✦

    ʢ͋·Γॻ͔Ε͍ͯΔ͜ͱ͸ͳ͍͕ʜʜʣ 8
  9. JSON.LOAD ✦ IUUQTXXXSVCZMBOHPSHKBOFXTKTPOEPT DWF l஫ҙA+40/MPBEAΛ࢖༻͢Δ৔߹ɺ͜ͷڍಈ͸มߋ͞Ε·ͤΜɻA+40/MPBEAʹ͸৴ པͰ͖ͳ͍ೖྗݩ͔ΒͷσʔλΛܾͯ͠༩͑Δ΂͖Ͱ͸͋Γ·ͤΜɻ΋͠৴པͰ͖ͳ͍ ೖྗݩ͔Βͷ+40/υΩϡϝϯτΛॲཧ͢Δ৔߹ʹ͸ɺৗʹA+40/QBSTFAΛ࢖༻ͯ͠ ͍ͩ͘͞ɻz ✦ ͨ·ʹ+40/MPBEͰॻ͔Ε͍ͯΔ΋ͷ͸͋Δ

    ✦ ͪΐͬͱલͷQHHFNͱ͔ ✦ ʢࢿྉॻ͘ͱ͖ʹ΋ͨ·ʹؒҧ͑Δ͜ͱ͕͋Δʜʜʣ 9
  10. ⇠ RUBY GEM ⇢ 10

  11. +40/ؔ܎ͷ(&. ✦ KTPO ✦ KTPO@QVSF ✦ KTPOKSVCZ ✦ ZBKMSVCZ ✦

    "DUJWF4VQQPSU ✦ 0K ✦ DSBDL ✦ ଞʜ ✦ ͦΕͧΕڍಈ͕ҧ͏ 11
  12. "$5*7&4611035 ✦ "DUJWF4VQQPSU+40/EFDPEF ✦ ஋ͷதͰ೔෇ͷจࣈྻ͕͋ͬͨΒ%BUF΍5JNFʹ͢Δ ✦ IUUQTHJUIVCDPNSBJMTSBJMTCMPCNBTUFSBDUJWFTVQQPSUMJC BDUJWF@TVQQPSUKTPOEFDPEJOHSC 12

  13. $3"$, ✦ :".-Λ࢖ͬͯύʔε͍ͯ͠Δ ✦ :".-͸+40/ͷεʔύʔηοτΒ͍͠ ✦ IUUQTHJUIVCDPNKOVOFNBLFSDSBDLCMPCNBTUFSMJCDSBDL KTPOSC 13

  14. 0+ ✦ ࣮ߦ͕ૣ͍Β͍͠ ✦ 0KQBSTF͸ͳ͘0KMPBEͷΈ ✦ Ҿ਺ʹΑͬͯNPEF͕มΘΔ ✦ IUUQTHJUIVCDPNPIMFSPKCMPCEFWFMPQQBHFT.PEFTNE ✦

    ͳʹ΋ࢦఆ͠ͳ͍৔߹͸೚ҙͷΫϥε͕࡞ΕΔ ✦ 3$&JO4MBOHFS B3VCZJNQMFNFOUBUJPOPG1VTIFS ✦ IUUQTXXXIPOPLJOFUSDFJOTMBOHFS ✦ ϢʔβೖྗΛA0KMPBE NTH AͰೖΕ͍ͯͨͨΊʹ3$& 14
  15. ґଘؔ܎ ✦ ࢖͍ͬͯΔHFNͷதͰԿ͕ݺ͹Ε͍ͯΔ͔ʁ ✦ HFN͕࢖͍ͬͯΔύʔαʔ͸ͲΕ͔ʁ ✦ 3BJMTͳͲͷΞϓϦέʔγϣϯͰ͸ෳ਺ͷHFNΛ࢖͏ ✦ ύʔαͷHFN͕ෳ਺ಡΈࠐ·Ε͍ͯΔ͜ͱ΋ ✦

    ϦΫΤετͷ+40/͕ͲͷΑ͏ʹύʔε͞ΕΔ͔Λ೺Ѳ͓ͯ͠ ͍ͨ΄͏͕ҰԠ҆શ 15
  16. 36#:Ͱ+40/Λ҆શʹύʔε͢Δʹ͸ʁ ඪ४ͷ+40/QBSTFΛ࢖͏ ࢖͏HFNͷυΩϡϝϯτͱ࣮૷ΛಡΉ 16

  17. ऴΘΓ 17