Minifies JSON-like strings by removing whitespace and comments.