use json istead of ast