It is currently April 19th, 2024, 7:31 am

Webparser plugin showing garbage

Get help with creating, editing & fixing problems with skins
Angelus
Posts: 3
Joined: January 7th, 2018, 9:27 am

Webparser plugin showing garbage

Post by Angelus »

Hi

I'm trying to parse a .json file but the webparser changes the contents.

e.g. (cut down version of live .json)

{"src":1,"feeds":[{"id":1,"name":"MLAT Receiver","polarPlot":true}],"srcFeed":1,"showSil":true,"showFlg":true,"showPic":false,"flgH":20,"flgW":85,"acList":[{"Id":5022331,"Rcvr":1,"HasSig":true,"Sig":5,"Icao":"4CA27B","Bad":false,"Reg":"EI-DHR","FSeen":"\/Date(1515316037420)\/","TSecs":39,"CMsgs":46,"Alt":38000,"GAlt":38552,"InHg":30.47244,"AltT":0,"Call":"RYR8005","Lat":54.890396,"Long":-1.888679,"PosTime":1515316069640,"Mlat":false,"Tisb":false,"Spd":402.1,"Trak":1.1,"TrkH":false,"Type":"B738","Mdl":"B737-8AS /W","Man":"Boeing","CNum":"33822","From":"LEAL Alicante, Spain","To":"EGPD Aberdeen Dyce, United Kingdom","Op":"Ryanair Ltd","OpIcao":"RYR","Sqk":"7460","Help":false,"Vsi":0,"VsiT":0,"Dst":253.35,"Brng":176.5,"WTC":2,"Species":1,"Engines":"2","EngType":3,"EngMount":0,"Mil":false,"Cou":"Ireland","HasPic":false,"Interested":false,"FlightsCount":56,"Gnd":false,"SpdTyp":0,"CallSus":true,"Trt":2,"Year":"2005"},{"Id":5031158,"Rcvr":1,"HasSig":true,"Sig":6,"Icao":"4CC4F6","Bad":false,"Reg":"TF-GPA","FSeen":"\/Date(1515315888835)

but when debugged the webparser debug files shows

‹ ÍšÛNãȆ_ÅòÕŒ”¤ë|àÎ9¢4§azöÌ…IX›mZhÔï¾W9‰]»“ ÒnÔ“ò±ëó¿þZüëæÙÂ=Â÷:—¹{ôŸÝhYH‚ûÐ=rO§ÞÜ™…‹0z
3·ã>¤qÇiáÙcø㟎yÄ1Ü]ޕߦßý(^\5ã»yÁ¯ƒ8‡öu|sâTþºtï¸ÁbåEÙ“ <“#Bƒ'ÏOYùŠ“ ÷£ê‘åOÖq'‹ …'†úÙ–Õkf!\ãŽ&ÝãÙœ:öÃ0Eøæ˜S,™dŒËßÿþWÌýp“A0ôlpšßÀoJEÇõbèa‚@?Ç›•ðöä^AtOÓpyáÜ=‚»çåU”hMàQA3ãξÍô_—ðši ç8ïQ%QÐNxJ—ôUˆéŽ{žæóÈ,úBPl.<ÍëÑÍ£üªjø0l†uÂ‰,¸ƒ[¡WÄ4îNê[ eΨžXIÍüùÁ¬v_R;]Æ«†ì*Ïw~»üÝ̤õÓ0‚^Â`Îï̈́üI3©Yjš£±ï;0Žeš8~$y.;Î×$‚ÿ;ŸáÎ%\¯3k5Í|­ÇÜñ¢ÌéÐ3Ç¢.øò`&ê9H85-–å¡õÃüAÓÿ/Á%hœ„ñC5º‹<‚ÁI3ãðs^ÍЄÖ0`hô33ÏXñ¬éå| +gf.\Da^^=Jn¢ÄüvÍᵚZþ>M“¢\ÜSèë—ÒG¸|’…q˜ÞB”Ú‘>IŠ0ÍlT‡Žãèæ¶È«ÇaA<N–öJÂ[Ë÷˜¸ñózù27÷[d¦÷GgÅ#3Åöæ yw/&g“V^Gšà-^e/z‰]„*\'Z(ê1IÌ°_ÐBB,ý³¡æã
„1ÆjXPO [‚6À")Vh',˜Ò¢ØŠ–¾&~t—fùݳãw5ñ*6ªÃÏ‹,¸.jL4A„ M`÷ƒ«Eº¸sN£<€”AÑ"ˆ?Ìž¢E˜;_®¯ác™…vÜÃTTqO£qßlöhöõÌGcõˆ÷tCÔ³Ö¨';£þÞ?6+zHô3;úYý „Kõóèç¶ZPIZÕb2h~D!nÄVôN«èW˜¬£Ÿ*]‡?Õì§ñ_F’Z
(…7ZA¯æR4=¦Fv)—=T)ÆæCØôoÑ¡éõ`2óœAÜ?DIÚqfé}Ðq&E? ¾h`Hô
ø„õj0¬Ç/#Ʊyàµ`
aIvð -9@ªÏZä`ôõ|ބƶ€ÀˆÕDh.Ô È³*"@ö Â?™cõÍx¥ ó*cBIÔ”1)¦÷Șˆ”=¹ášd
ź¢¾ñW&uc]LqÄúø$Y>æE…5²:›ŒétCÆI·Yú½ŒÑø|èxWa¶„©w†Ï‹°áÊ•²%Éo}žsç<^lIˆwY‘‚o‘ŽÉ+T`RHŠ6Ü|(*ïÖø¿„jd4ÂHí0ª&ƨ¡n$ÆugÇßÚ‰A\añ‚©+bᕈ0d‰ãÊf†#€\5PÓŸþI0¶¨ÁT—⸦÷°Tجu5%M{¨Hå3Ã=¾·Š|æ;T„”º¼aŏqZ܆ÉÕcvӝÂGõ), ":ÖapßÃe˜l¨æ¾3“0‹®CÇO‹ÛNÝžäæÓüÂqÌ¿N®ãgç,Í–Ñ68Ó?-p„l½¤Æ8,TNÌ}(6ÕˆÅÅ$o˜:ábB Iö·çRQÕlϧgÝÙìk+-TAf±mÏ1Eµ?'U]QËq(µOÊå{>H[)—àX^¥\\S®y,i±‡)§jÅG Å+½ÙE[A±Û~ŸO/yœ:ã Ä"»OäcÂÄ “ÁÀ§-nM|dmJâ/ ( ž¢ 1r—j!SV!Á™hÑX—WyÖ¤§u2¹è‡bQø་½#ñBÄ6"Œé\Ûˆx£~«)U»™<²ÍR;‰ø†„¶œø~*âÏ?3Üÿ˒ʉµŒÐSfèíÉ—R=\‘yÞ\Š:ý
³4Š(ˆCÇ+2Iº¡:Û:=ŸYYL—…í‘Y­°™/áãp ®¤JìW¬éU“-BæŸ-B$þ¹hT»T„ô(ÝÐA ó:ŒŽÝ~ý¶„êñØJ«ßÛ™CZÕç­iÕ¨](€‡^!j¡À˜® Ü­‰€ã{áù„3;±âJpÍ,;¢47;
@À<ì‚J´2ä¥;WzeÕ¥BnK…gŸ.[Å‚‚.r;«ò=0åéâî6ï»^f‚,wuèeB°œ8#“mÝ~pðf»Þ%øµ‘Ú&³q÷k¤S˜
F³nLÞ±%lL´hÞÀ2˜|î·bÿQýNj¿Ž¹Àzc?¨–UÅjŠCXTÄœ]Ì°¶÷³4WVnEaU‰0›Ç¯AXÊݹ•°¶³ ã0î´¡àQæ1!øìµ—'¸Køê„eæk‚¤Bf[o0!géS°-$0vª…öÒQ™v‚ʢЯ‹¡ø bGÅ—–ïk?‹ˆhö_¾uÏ}¯†„~±ŸÅ³dD0ÔbÏ
Fµá`DcŠ_ËÈùìrµ‰¿¢¼Ð.Õ¼©µ—=¼ÞÔ"”¿¦¢Õqü¡ÚE ¥Þ!"o â<ƒÑgAY&´ÔÅ&ä|6±5¥ÙŒ¼öç©w€UiÊ>”a˜Üðí9v "[‚"·*"”î0"Øl;ÕV„ÈV+2<™µ"ƒ¨dm##Œ/Ø #9ÛxtlƒùžEµJ_V¼È¦’lñ"¬T³Ù‡,ivQ°ëíiWCQä§y—²=ÇtäM/Ž ’«ä}àNïµÙ&]Œ”z µª„BŽÂÛ]Ç^â[¥qÉwäVeɸ.Ž÷騥r19û܆Wšþ…òÖ(HNÔá$Ì­zz]Wü†0DÚ®Œ(žèÍæ\£U5¤ÔÛ4äªãÔýÈêxó_…t±~e*@Ä&îµnÜ¡ýÿÇ9’ï+ŽÿÓq‹´bÏü©ô8òbø§…(ÕHbøG`ÅËM¼ü¶˜g1­‰Ah÷[1£ÑÿŸ6&‘6&


If i open the .json file directly into Notepad or Notepad++ or any editor, i can see the plain text as shown in the 1st example. Not sure why the webparser would change this to jibbeish.

Does anyone have any ideas on how to stop this happening? Any help would be appreciated.

Thanks
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Webparser plugin showing garbage

Post by balala »

What is the encoding of that .json file?
Angelus
Posts: 3
Joined: January 7th, 2018, 9:27 am

Re: Webparser plugin showing garbage

Post by Angelus »

Hi

Its just plain text, the cutdown example is a direct output from the .json file.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Webparser plugin showing garbage

Post by balala »

Angelus wrote:Its just plain text, the cutdown example is a direct output from the .json file.
Yes, but the .json file is encoded. ANSI, Unicode, or something. The question was about this detail.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Webparser plugin showing garbage

Post by jsmorley »

Try adding CodePage=1200 to the WebParser parent measure.

https://docs.rainmeter.net/manual/plugins/webparser/#CodePage
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Webparser plugin showing garbage

Post by jsmorley »

You can find the encoding used in Notepad++ here:
1.png
You do not have the required permissions to view the files attached to this post.
Angelus
Posts: 3
Joined: January 7th, 2018, 9:27 am

Re: Webparser plugin showing garbage

Post by Angelus »

Hi

I was waiting for a reply from the developer but until then - Notepadd++ reports UTF-8
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Webparser plugin showing garbage

Post by jsmorley »

If you can zip up and attach the .json file here, I'd like to take a look at it.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Webparser plugin showing garbage

Post by balala »

jsmorley wrote:If you can zip up and attach the .json file here, I'd like to take a look at it.
Probably you also should include the used config (the Rainmeter skin).