Using JSON with SWI-Prolog

Yes that is one option I plan to explore but find that doing some of the parts manually at first makes it easier to understand what is happening when the need to fix problems later happens.

I am more in the experimental stage than anything right now and have never really used JSON, SWI-Prolog dicts or Cytoscape.js to a level that I feel comfortable so this is like doing lots of homework problems to learn.

I didn’t even know json_write_dict/2 existed until just yesterday when trying to answer this other question.

There is also the code by CapelliC (GitHub - CapelliC/swish_cytoscape_js: SWISH graph rendering by means of cytoscape_js) which I want to better understand.