A light weight remote procedure call protocol. It is designed to be simple!
JavaScriptのオブジェクトをJSONに変換する際、必ずと言っていいほど使われるのがjson2.js。 ECMAScript5(JavaScript2)では、json2.jsの実装をほぼ忠実に仕様として再現しており、Firefox3.5やSafari4ではネイティブの実装が利用できます。 例えば、JSオブジェクトをJSON文字列にしたい場合は、JSON.stringify(value, replacer, space)を利用できます。 valueはJSオブジェクト。 replacerは省略可能で、function(key, value)と言うシグネチャの関数オブジェクトを渡します。JS→文字列の変換ルーチンを独自に提供できます。 spaceは、結果の文字列を人間が読みやすくするための、インデントの数を指定します。 その逆に、JSON文字列をJSオブジェクトに復元したい場合は、JSON
Previously I analyzed ECMAScript 5’s Object and Property system. This is a huge new aspect of the language and deserved its special consideration. There are a number of other new features and APIs that need attention, as well. The largest of which are Strict Mode and native JSON support. Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a “strict” o
[edit] [comment] [remove] |2007-02-21| e1 # JSONPath - XPath for JSON A frequently emphasized advantage of XML is the availability of plenty tools to analyse, transform and selectively extract data out of XML documents. XPath is one of these powerful tools. It's time to wonder, if there is a need for something like XPath4JSON and what are the problems it can solve. Data may be interactively found
JSON.parseとJSON.stringifyがサポートされた。 これは、JSON in JavaScriptのネイティブ実装と言える。 これからWebサイトでJSONを使う時は、 <head> <script type="text/javascript"> if (typeof JSON != "object") document.write('<script type="text/javascript" src="http://www.json.org/json2.js"></script>'); // 実際にはローカルに落したものを使う </script> <script type="text/javascript"> // JSON.parseやJSON.stringifyを使う処理 </script> </head> とすると、クロスブラウザで、なおかつ最新のブラウザだとネイ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く