Wednesday, April 6, 2011

Suggested Improvements to JSON

Today I'm publishing an essay about my suggested improvements to JSON. I really like JSON a lot, but I think that it could use a few tweaks to make it easier to use for the common man.

One question some have asked is: even if these changes to JSON were accepted, how would you transition existing systems? I would lean towards what I call the Nike approach, which is: "just do it." That is, start updating the JSON.parse() method in the browser to accept these extensions to JSON. What I am proposing is a strict superset of what's in RFC 4627 today (which you may recall claims that "[a] JSON parser MAY accept non-JSON forms or extensions"), so it would not break anyone who continued to use ES3 style JSON.

At first, you may think that sounds ridiculous -- how could we update the spec without versioning? Well, if you haven't been paying attention to the HTML5 movement, we are already doing this sort of thing all the time. Browser behavior continues to change/improve, and you just have to roll with the punches. It's not ideal, but yet the Web moves forward, and it's faster than waiting for standards bodies to agree on something.

Though if the Nike approach is too heretical, then I think that versioning is also a reasonable option. In the browser, a read-only JSON.version property could be added, though I don't imagine most developers would check it an runtime, anyway. Like most things on the web, a least-common-denominator approach would be used by those who want to be safe, which would ignore the version number. Only those who do user-agent sniffing on the server would be able to serve a slimmer JavaScript library, though that is already true for many other browser features today. I trust Browserscope and caniuse.com much more than any sort of formal specification, anyway.

Special thanks to Kushal, Dolapo, and Mihai for providing feedback on my essay.

7 comments:

  1. ฝาก ถอน ตลอด 24 ชั่วโมง โปรโมชั่น 20รับ100 ทํา 200 ถอนได้100

    ReplyDelete
  2. แม้คุณปรารถนาพนันสล็อตออนไลน์เว็บไซต์ตรงที่สุดยอด จึงควรบอกเลยว่าจำเป็นที่จะต้องเลือกพนันบนเว็บ เว็บไซต์ PGSLOT เว็บตรง ที่บนเว็บของพวกเราเพียงแค่นั้น

    ReplyDelete
  3. รวมเว็บ SPINIX เล่นเกมสล็อตที่คุณอยากได้ได้ทุกเกม ไม่ว่าจะเป็นเกมหายากเพียงใด และจากนั้นก็ที่สำคัญก็คือมีการเงินที่ช่ำชองสำหรับเหล่านักลงทุนเป็นอย่างยิ่ง

    ReplyDelete
  4. มวยพักยก ซึ่งตีราคาให้ที่เป็นธรรมกับสมาชิกที่สุด และออกกฏกติกาไม่เอาเทียบผู้เล่น เพื่อสมาชิกที่เข้ามาได้รับการบริการที่ยอดเยี่ยม

    ReplyDelete
  5. โปรแกรม สูตรสล็อต PG ใช้ได้จริง สามารถกระทำการพินิจพิจารณาอัตราการชนะเกมสล็อตค่ายดังในเว็บไซต์ตรงได้ 2 แบบ แบบแรกจะพินิจพิจารณาเป็นภาพรวมว่าแบบเกมสล็อตนั้นๆช่วงเวลาดีๆที่สุดสำหรับการจ่ายรางวัลเกิดขึ้นเวลาไหน แบบลำดับที่สองเป็นการวิเคราะห์แบบเรียลไทม์บอกนักพนันได้ในทันทีในในเวลาที่ปรารถนาเล่นว่าแบบเกมแต่ละเกมมีอัตราชนะมากมายน้อยเท่าใด เกมที่ควรจะเล่นจะต้องมีอัตราชนะตั้งแต่ 80% ขึ้นไปแค่นั้นสูตรสล็อต PG

    ReplyDelete
  6. เบียร์สดอุตสาหกรรม: เพื่อหลอมรวมรสของผลิตภัณฑ์สำเร็จรูป, แนวทางการผลิตเบียร์สดรวมทั้งรูปแบบของเบียร์สดอุตสาหกรรมถูกใจเป็นแบบสันโดษ, แล้วก็ระยะเวลาสำหรับเพื่อการหมักสั้นเยอะ, โดยเหตุนั้นอุตสาหกรรมเบียร์สดก็เลยมีรสชาติค่อย, ฟองอากาศมากเพิ่มขึ้น, ความเข้มข้นของสาโทต่ำ, ปริมาณฮ็อพต่ำและปริมาณแอลกอฮอล์ต่ำ. รวมถึงลักษณะอื่นๆ, ค่าทางโภชนาการตามธรรมชาติและราคาก็ต่ำลงยิ่งกว่าด้วยเหมือนกัน.https://beer6.net/

    ReplyDelete