add spec for _to_json() and escapes