It is currently March 28th, 2024, 9:36 am

JSONParser plugin - Call for feature suggestions

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

JSONParser plugin - Call for feature suggestions

Post by rcurrier »

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: 446
Joined: August 7th, 2012, 9:18 pm

Re: JSONParser plugin - Call for feature suggestions

Post by thatsIch »

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

Post by bassie »

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