In Maryland you can only fill containers you sell. Thus growlers are legal, but only growlers sold originally by that business. So there can be a difference between a growler and a mason jar, but not in Washington State.
How long will it last? Depends on the style of beer, but if it's filled correctly, it should last a while. High gravity beers and those with strong flavors (IPAs, etc) last a lot longer than light beers. Mason jars get a real nice seal, so I'd imagine it would be similar to a growler for storage, as long as the bartender was careful to not trap oxygen in the headspace.