import safe json generation