break out wkt and json grammars into separate libraries