A JSON parser with a choice of grammars