I'm using joern with the command line functions, the following is my python script:
parse_command = f"{joern_path}joern-parse {java_file} --output {output_path}/{file} "
subprocess.call(parse_command, shell=True)
export_command = f"{joern_path}joern-export {output_path}/{file} --out {output_path2_temp} --format {Format} --repr {graph_type}"
subprocess.call(export_command, shell=True)
The problem is, when I try to get the ASt graph type with any file format like json, xml (except dot), it gives me the following error :
Exception in thread "main" scala.NotImplementedError: repr=Ast not yet supported for this format
at io.joern.joerncli.JoernExport$.exportWithOdbFormat(JoernExport.scala:159)
at io.joern.joerncli.JoernExport$.exportCpg(JoernExport.scala:111)
at io.joern.joerncli.JoernExport$.$anonfun$main$2(JoernExport.scala:67)
at io.joern.joerncli.JoernExport$.$anonfun$main$2$adapted(JoernExport.scala:66)
at scala.util.Using$.resource(Using.scala:261)
at io.joern.joerncli.JoernExport$.$anonfun$main$1(JoernExport.scala:66)
at io.joern.joerncli.JoernExport$.$anonfun$main$1$adapted(JoernExport.scala:61)
at scala.Option.foreach(Option.scala:437)
at io.joern.joerncli.JoernExport$.main(JoernExport.scala:61)
at io.joern.joerncli.JoernExport.main(JoernExport.scala)
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Even though, in the documentation of joern they well said that it is adequate with any type of graph, and I'm using the last version of joern.