Page 1 of 1

Script Unit - Json - JsonTools.pas

Posted: 2023-08-03 11:41:55
by boyerf
Hi,

I have worked on a new script ans I need to use JSON file structure.
Is there a possibility to use the JsonTools library in AMC ? This is a small pascal based json parser in one unit with no dependencies.
https://github.com/sysrpl/JsonTools/tree/master.

I don't no if it's easily adaptable.

Best regards
François

Re: Script Unit - Json - JsonTools.pas

Posted: 2023-08-05 13:09:43
by antp
Hi,
I'm not sure if it would be easy to adapt that unit into a .pas file to be included in a script.
It would probably be easier to include it directly in AMC itself, and add to the script engines the needed functions to interface with that parser.
However I don't know when I would have time to do that, as I have already so many things to do :/
Maybe it would be easier to write a very basic Json parser with AMC's script engine? I would still represent some work though...
Or just parse the Json like we parse the HTML.

Re: Script Unit - Json - JsonTools.pas

Posted: 2023-08-06 06:49:12
by boyerf
Hi,
Thank for your response. Yes for the moment, I will use a simple parse method for json.
I work on a script for TMDB. I think it will be interesting for some people's here.

Best !