implemented optional JSON vulnerability protection