This is related to #4. In that issue, one level of escaping is lost in names. When pretty=TRUE, another level of escaping is list:
# Loses one level of escaping in name:
cat(RJSONIO::toJSON(list('foo\\\\.foo'='bar.\\\\bar'))){
# {
# "foo\\.foo": "bar.\\\\bar"
# }
# Loses two levels of escaping in name when pretty=T:
cat(RJSONIO::toJSON(list('foo\\\\.foo'='bar.\\\\bar'), pretty = TRUE))
# {
# "foo\.foo" : "bar.\\\\bar"
# }