don't serialize JSON when type not given (fix #56)