menu_book Course Curriculum (JSON) expand_more
Syntax Foundations
String Rules
Numbers & Types
Data Modeling
JavaScript Integration
API Payloads
Validation
Prototype safety
Learn Prototype safety in JSON with a dedicated explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Advanced
json-063.json
json
const input=JSON.parse('{"__proto__":{"admin":true},"name":"guest"}');
const safe=Object.create(null);
for(const [k,v] of Object.entries(input)) if(k!=="__proto__") safe[k]=v;
console.log(safe.name);
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content