jsmorley wrote: ↑May 22nd, 2020, 10:59 am
I am very hesitant to jump to any conclusions, and certainly hesitant to try and "fix" an issue that at least for me, doesn't exist.
Yes, that would be the wise choice indeed - you never know if they're going to revert this or not. Another option, if possible, of course, would be to add those "differences" as optional patterns (either using ?
or the |
or character) to the current regexes, so that it would work with either format. The latter, obviously, if the two formats aren't critically different from one another.
: Simple example, based on the sample skin I posted above:
Code: Select all
This should work with either format. Not sure if it's possible for all the fields, but then, it's just an example, after all.
: While I believe the above "or" method will work for every field, there is another issue that makes it unfunctional: since the names of the fields changed and they are ordered alphabetically in the weather.com source, this means that the order of the fields in the "new" regex(es) would have to change as well
. In other words, if this change becomes definitive, one would have to rebuild the regex(es) completely - the "old" regex(es) do help
as they can be used as a base for the "new" regex(es), but it's both the names and the order of the names
that would have to be "updated" for everything to work flawlessly.
: This is where a stable and supported by the Rainmeter team JSON parser would come handy...
Just change the names of the fields, without bothering with their order in the JSON source. Sure, this can be done using regex as well, but you'd have to waste resources by parsing the source string multiple times, once for each field (assuming they're unique).