New plugin: Json Parser

Discuss questions about plugin development with the Hollywood SDK here
Post Reply
midwan
Posts: 35
Joined: Sun Jun 19, 2016 1:15 pm

New plugin: Json Parser

Post by midwan » Sat Nov 10, 2018 10:20 pm

I was thinking about developing a new Plugin for Hollywood, to handle Json strings/files.
I haven't done that before for Hollywood, but I do have experience with C/C++ and other languages.

I've got the SDK, and I saw that there's already an XMLParser plugin, but unfortunately the sources for that are not available.

Would it be possible to share those, as I think it might be quite similar in concept to what I have in mind?

User avatar
airsoftsoftwair
Posts: 2662
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: New plugin: Json Parser

Post by airsoftsoftwair » Sun Nov 11, 2018 10:14 pm

I can send you the XML parser plugin source code if you want. Please send me an email.

SamuraiCrow
Posts: 179
Joined: Fri May 15, 2015 5:15 pm
Location: Ft. Collins, Colorado USA

Re: New plugin: Json Parser

Post by SamuraiCrow » Mon Nov 12, 2018 10:47 am

I'm pretty sure that Allanon has written a JSON parser for the patrons of his Patreon account and it's pure Hollywood so no need for plugins.

midwan
Posts: 35
Joined: Sun Jun 19, 2016 1:15 pm

Re: New plugin: Json Parser

Post by midwan » Mon Nov 12, 2018 1:30 pm

Thanks for both the replies!

My e-mail is midwan at gmail dot com, if you could send me the sources for the XML Parser. Even if there's already something out there, it would help me understand how one would go about writing something similar anyway.

@SamuraiCrow: Is there a link to Allanon's work somewhere? Is it available for all, or only for the patrons?

User avatar
Clyde
Posts: 105
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: New plugin: Json Parser

Post by Clyde » Mon Nov 12, 2018 2:40 pm

@midwan: Thumbs up for learning and understanding! Here are Allanon's libaries: http://www.a-mc.biz/_software/hollywood-libraries/ But it seems no JSON lib here. If yo go to his documentation site (http://a-mc.biz/docsite/doku.php) at least "JSON" is listed.

I can't find something JSON releated on his Patreon site (I am a Patreon and so should you :-D ), though.
Currently using: Hollywood 7.1 with Windows IDE

SamuraiCrow
Posts: 179
Joined: Fri May 15, 2015 5:15 pm
Location: Ft. Collins, Colorado USA

Re: New plugin: Json Parser

Post by SamuraiCrow » Thu Nov 15, 2018 4:40 pm

I appear to have opened a can of worms. I am a translator for Allanon's documentation. As such, I seem to have access to some unreleased software libraries. It's up to Allanon to release and write the original Italian documentation for me to translate and tidy up in English.

User avatar
airsoftsoftwair
Posts: 2662
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: New plugin: Json Parser

Post by airsoftsoftwair » Fri Nov 16, 2018 9:10 pm

@midwan: I have just sent the xmlparser sources to you. It is based on LuaExpat. The easiest way to create a JSON plugin for Hollywood is probably to take an existing Lua JSON plugin and adapt it to Hollywood's plugin interface. You have to be careful with some Lua internals, though, because Hollywood still uses Lua 5.0 and most Lua plugins target later versions like 5.2 or 5.3.

midwan
Posts: 35
Joined: Sun Jun 19, 2016 1:15 pm

Re: New plugin: Json Parser

Post by midwan » Fri Nov 16, 2018 9:12 pm

Understood, thanks for sending me the sources and the useful input :)
I'll post any news here when I have them!

User avatar
airsoftsoftwair
Posts: 2662
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: New plugin: Json Parser

Post by airsoftsoftwair » Fri Nov 16, 2018 9:22 pm

Would be nice if you could finish that job. A JSON plugin is on my agenda as well but if you do it, then that's even better, because it leaves more resources for me for the really important stuff :)

Post Reply