なんだこれ? Someone know about this behaviour of JSON.parse?
Conversation
Notices
-
Ryō Igarashi (neet@mastodon.social)'s status on Sunday, 09-Sep-2018 21:08:43 JST Ryō Igarashi - いたばしのげんちゃん。:verified: repeated this.
-
Eugen (gargron@mastodon.social)'s status on Sunday, 09-Sep-2018 21:09:49 JST Eugen @neet JSON.parse('{}') -> Object
JSON.parse('"foo"') -> String
JSON.parse('1') -> Number
いたばしのげんちゃん。:verified: and Asmodeus :dumpling: ? repeated this. -
Eugen (gargron@mastodon.social)'s status on Sunday, 09-Sep-2018 21:22:01 JST Eugen @neet Oh, I see. JavaScript numbers don't support bigint so they overflow. You need to use strings for really large numbers.