Another interesting argument, is that they allow you to distribute your "App", if you clearly add from where the data are provided.
Nothing more or less than we do with Weather.com.
It is currently March 28th, 2024, 12:11 pm
JSON Parsing
Re: JSON Parsing
I just tried this and it returns with "RegExp matching error (-1)" in the log.FreeRaider wrote:Starting from your first post:Anyway, I agree with jsmorley, because that A with ^ is a unicode problem.Code: Select all
RegExp=(?siU).*"currently": \{.*"temperature":(.*),.*
Here's what the meters and measures look like so far:
- FreeRaider
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: JSON Parsing
Code: Select all
(?siU).*"currently":.*\{.*"temperature":(.*),.*
It works for me.
P.S.: you have to use the backslash \ before { because this one is a reserved character.
RESERVED CHARACTERS:
There are a few "reserved characters" in Regular Expressions. They are:
[ \ ^ $ . | ? * + ( { }
If you use these characters in a "search" or "endsearch" component, RegExp will assume they are commands, not text, and the expression will fail. To use these characters, you must "escape" them with the "\" (backslash) character. Use "\\" to escape the "\" character itself.
Last edited by FreeRaider on September 12th, 2017, 7:37 pm, edited 1 time in total.
Re: JSON Parsing
This one works! Thank you sooooooo much!FreeRaider wrote:Try this one.Code: Select all
(?siU).*"currently":.*\{.*"temperature":(.*),.*
It works for me.
Thanks, this is some incredibly helpful information to know when working with these sorts of things, I've got to have gone through like 600 yesterday and this morning. xDjsmorley wrote:One thing you might do is set Debug=2 on the parent WebParser measure and refresh the skin one time. That will give you a file WebParserDump.txt in the skin folder. Then change the URL to
URL=file://#CURRENTPATH#WebParserDump.txt
While you are designing and testing. That way you don't blow through your 1,000 free calls for the day while you are hammering it over and over to tweak the design.
When you are happy, then change the URL back.
Now the only problem that I know about is when refreshing it, I can see the degree sign, but the it disappears and is replaced with a 6. It's trying to say 67 degrees but even with changing the width it won't show the whole thing.
-
- Posts: 1
- Joined: September 29th, 2017, 11:06 pm
Re: JSON Parsing
Interrogative: Is it necessary to have the .* at the beginning and ending of the regex? Or, will this code also work?
Code: Select all
(?siU)"currently":.*"temperature":(.*),
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: JSON Parsing
Have you tried your RegExp? If yes, does it work? It's easy to investigate yourself...fabyouless wrote:Interrogative: Is it necessary to have the .* at the beginning and ending of the regex? Or, will this code also work?Code: Select all
(?siU)"currently":.*"temperature":(.*),