- Create a folder at the root of your user home folder
(Example:
C:/Users/uname/
) called.ssh
. - Create the following files if they do not already exist (paths begin from the root of your user home folder):
.ssh/config
/*! | |
* @author yomotsu | |
* Released under the MIT License. | |
*/ | |
:root { | |
--stroke-color: #ccc; | |
} | |
* { |
JSONは NaN
/ Infinity
/ -Infinity
や Date
型等に対応していない。
しかし、JavaScriptのJSONは、これらを解消する仕組みを持っている。
それは JSON.parse
の第二引数の reviver
とJSON.stringify
の第二引数の replacer
だ。
注意が必要なのは、 Date
型は toJSON
メソッドを持つため replacer
に値が渡る前に文字列になってしまうこと。
これに対応するには toJSON
メソッドを一時退避してしまえば良い。
これらを上手く駆使すれば、JSONに型を保ったまま値を保存し復元することができる。