public char escapedChar(char c) {
	// thanks to douglascrockford for a rough approximation of this
	switch (c) {
	case '\\':
	case '"':
	    return c;
	case 'b':
	    return '\b';
	case 't':
	    return '\t';
	case 'n':
	    return '\n';
	case 'f':
	    return '\f';
	case 'r':
	    return '\r';
	default:
	    return ' ';
	    // need to handle unicode
	}
    }