- MaxxDamage: Vizes Laptop Hűtés? Lehetséges? Igen!
- Gurulunk, WAZE?!
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Fűzzük össze a szavakat :)
- sellerbuyer: Milyen laptopot vegyek? Segítek: semmilyet!
- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- skoda12: Webshopos átverések
- Lalikiraly: Sencor SMC BS30 aktív hangfalszett bemutató
-
LOGOUT
JavaScript != Java (A JavaScript nem összekeverendő a Javával, két különböző programozási nyelvről van szó!)
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
Szívesen!
Innen érthető meg elég jól, mit is csinál a JSON.parse(), lényegében hasonló az eval()-hoz, csak az a nagy különbség, hogy a JSON.parse() nem engedi lefutni pl. az esetlegesen kártékony JavaScript-kódot. Az eval()-nak pedig épp ez a nagy veszélye, hogy rajta keresztül lefuthatnak a rosszindulatú kódok.
Idézet:
"To convert a JSON text into an object, you can use the eval() function. eval() invokes the JavaScript compiler. Since JSON is a proper subset of JavaScript, the compiler will correctly parse the text and produce an object structure. The text must be wrapped in parens to avoid tripping on an ambiguity in JavaScript's syntax.
var myObject = eval('(' + myJSONtext + ')');The eval function is very fast. However, it can compile and execute any JavaScript program, so there can be security issues. The use of eval is indicated when the source is trusted and competent. It is much safer to use a JSON parser. In web applications over XMLHttpRequest, communication is permitted only to the same origin that provide that page, so it is trusted. But it might not be competent. If the server is not rigorous in its JSON encoding, or if it does not scrupulously validate all of its inputs, then it could deliver invalid JSON text that could be carrying dangerous script. The eval function would execute the script, unleashing its malice.
To defend against this, a JSON parser should be used. A JSON parser will recognize only JSON text, rejecting all scripts. In browsers that provide native JSON support, JSON parsers are also much faster than eval. It is expected that native JSON support will be included in the next ECMAScript standard.
var myObject = JSON.parse(myJSONtext, reviver);"
Új hozzászólás Aktív témák
- 2025-Ös 10 Magos Legújabb Intel Core Ultra 5 225F 10x4.9Ghz RTX 5060TI 16/32Gb DDR5 5600Mhz 1TB M.2
- Ubiquiti UCG-Max-NS Cloud Gateway Max Unifi
- Apple iPhone 13 Mini 128GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 13 Mini 128GB, Kártyafüggetlen, 1 Év Garanciával
- Samsung Galaxy A55 5G 256GB, Kártyafüggetlen, 1 Év Garanciával
- LG 32SQ700S-W - 32" VA Smart - 3840x2160 4K UHD - 62Hz 5ms - WebOS - Wifi + BT - USB-C - Hangszórók
- LG 45GS95QE - 45" Ívelt OLED / 2K WQHD / 240Hz 0.03ms / NVIDIA G-Sync / FreeSync Premium / HDMI 2.1
- Telefon felvásárlás!! Samsung Galaxy S23/Samsung Galaxy S23+/Samsung Galaxy S23 Ultra
- GYÖNYÖRŰ iPhone 11 128GB Red -1 ÉV GARANCIA - Kártyafüggetlen, MS3126, 98% Akkumulátor
- Eladó egy wittings steel hr sport hibrid okos óra dobozával töltővel
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest