Have JsonWriter open file in write mode

JsonWriter currently doesn't open the file in write mode. Setting it to open in write mode with UTF-8 encoding.