create a json based ast