JSONParser plugin - Call for feature suggestions
Posted: 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?
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?