It is currently August 20th, 2019, 1:00 pm

JSONParser plugin - Call for feature suggestions

Share and get help with Plugins and Addons
rcurrier
Posts: 6
Joined: May 27th, 2016, 6:34 am

JSONParser plugin - Call for feature suggestions

rcurrier » June 28th, 2016, 6:02 pm

Since it appears that no one else has written one or has the ambition to write one, I'm writing a plugin that will parse a JSON string and return requested values. I have a partially working prototype that meets my needs, but would like some input from the greater community as to the features and usage of the plugin.

1. Should the plugin accept a URL and fetch the JSON itself or should it just accept the JSON string from some other source (presumably WebParser). Accepting just JSON simplifies the plugin as well as makes the .DLL smaller, but by using Curl as it's URL processor opens up the possibilities of additional Curl options like cookie support, authentication, FTP, SFTP, SCP, IPv6, etc.

2. Pass JSON string and list of JSON pointers desired into MeasureParent and get via StringIndex in MeasureChildren (like WebParser does), or pass JSON string into MeasureParent and pass a single JSON pointer into MeasureChildren. All of the hard work is done when the JSON string is deserialized so getting a JSON pointer should be quick.

3. Can anyone think of a reason to want a JSON serializer in RainMeter? You might want one if you were writing out data to a NoSQL database like MongoDB, but I'd think a specific MongoDB plugin would be better for that.

4. Any other suggestions?
User avatar
thatsIch
Posts: 464
Joined: August 7th, 2012, 9:18 pm

Re: JSONParser plugin - Call for feature suggestions

thatsIch » October 15th, 2016, 9:54 pm

1. JSON String would be beneficial for the use-case of using local JSON files to parse them even though fetch JSON from an URL is the default use-case. I personally like to use local files for testing (thus not requiring to download the file over and over again)

2. JSON string into MeasureParent and pass a single JSON pointer into MeasureChildren sounds more reasonable for scaling the code

3. maybe to abuse Rainmeter as REST APIs and thus use them for local communication between two skins, though this is pretty far fetched
bassie
Posts: 1
Joined: June 16th, 2018, 7:54 pm

Re: JSONParser plugin - Call for feature suggestions

bassie » June 16th, 2018, 7:58 pm

What about this one ... http://worldcup.sfg.io