タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

JSONに関するminodiskのブックマーク (7)

  • JSON unmarshaling with long numbers gives floating point number

    I was marshaling and unmarshaling JSONs using golang and when I want to do it with number fields golang transforms it in floating point numbers instead of use long numbers, for example. I have the following JSON: { "id": 12423434, "Name": "Fernando" } After marshal it to a map and unmarshal again to a json string I get: { "id":1.2423434e+07, "Name":"Fernando" } As you can see the "id" field is in

    JSON unmarshaling with long numbers gives floating point number
    minodisk
    minodisk 2015/06/30
    JSONのnumberをUnmarshalしてMarshalすると指数表現になる問題への対応
  • JSON decoding in Go

    Incidentally, decoding JSON data (or really, almost any data structure) is really easy in Go (golang). We simply call json.Unmarshal(…) and boom! We have nice data structures. Well, except if our input source is not very well defined (meaning not strictly typed). Objects with loose schema Take this example. We want to decode a JSON object that looks like this: { "author": "attilaolah@gmail.com", "

    minodisk
    minodisk 2015/06/02
    値を見てからデコードorエンコード方法を変える。カスタムパーサー的なもの。
  • Ajax - IE8にもJSON入ってます。使えるとは限らないけど : 404 Blog Not Found

    2010年08月17日12:00 カテゴリLightweight Languages Ajax - IE8にもJSON入ってます。使えるとは限らないけど はい、私の勘違いでした。 はてなブックマーク - Twitter URL Log JSONはIE8にも入ってるような IE8にも確かに native JSON が入ってます。 Native JSON in IE8 - IEBlog - Site Home - MSDN Blogs ですが、使えるとは限らないのです。 Compatibility mode (別名Quirks mode) では、JSONオブジェクトは無効になります。これ、豆知識な。心に血豆が出来たけど。 以下、デモです。 var json = {string:'json',number:2,object:{array:[true,false,null]}}; var str

    Ajax - IE8にもJSON入ってます。使えるとは限らないけど : 404 Blog Not Found
    minodisk
    minodisk 2010/08/18
    IE8 では Native JSON をサポートしているが使えない罠。「Compatibility mode (別名Quirks mode) では、JSONオブジェクトは無効になります。」
  • Microsoft Edge

    This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

    Microsoft Edge
    minodisk
    minodisk 2010/08/05
    IE8のネイティブJSONサポート。でも実は・・・ http://blog.livedoor.jp/dankogai/archives/51503830.html を参照
  • JSON - MDN Web Docs 用語集: ウェブ関連用語の定義 | MDN

    JavaScript Object Notation (JSON) はデータ交換フォーマットです。厳密なサブセットではありませんが、JSON は JavaScript のサブセットに似ています。多くのプログラミング言語が JSON をサポートしていますが、JSON はウェブサイトやブラウザの拡張機能を含む JavaScript ベースのアプリケーションに特に便利です。 JSON は数値、真偽値、文字列、null、配列 (順序付けられた値のシーケンス)、およびこれらの値 (または他の配列やオブジェクト) で構成されるオブジェクト (文字列値マッピング) を表すことができます。 JSON は関数、正規表現、日付などのより複雑なデータ型はネイティブに表現できません。(Date オブジェクトはデフォルトで ISO 形式の日付を含む文字列にシリアライズされるため、情報は完全に失われません。) JSO

    JSON - MDN Web Docs 用語集: ウェブ関連用語の定義 | MDN
    minodisk
    minodisk 2010/08/05
    Firefox歴代バージョンのネイティブJSONサポート
  • ネイティブ JSON を使う | MDN

    この文書では、 Gecko 1.9.1 で追加された ECMAScript 5 互換のネイティブ JSON オブジェクトについて説明します。以前のバージョンの Firefox で JSON を扱う際の基的な情報については、JSON のページをご覧下さい。 ネイティブ JSON オブジェクトは 2 つの重要なメソッドをもっています。JSON.parse() メソッドは JSON 文字列をパースし、 JavaScript のオブジェクトに変換します。JSON.stringify() メソッドは、 JavaScript オブジェクトを JSON 文字列に変換します。 注意:JSON オブジェクトは循環的な構造の変換には対応していません。そのようなオブジェクトを JSON 文字列に変換しようとすると、TypeError 例外が起こります。

    ネイティブ JSON を使う | MDN
    minodisk
    minodisk 2010/08/05
    FirefoxのネイティブJSONサポート
  • JSON - Wikipedia

    JSON (JavaScript Object Notation, pronounced /ˈdʒeɪsən/; also /ˈdʒeɪˌsɒn/) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values). It is a commonly used data format with diverse uses in electronic data interchange, including that of web applications wi

    JSON - Wikipedia
    minodisk
    minodisk 2010/08/05
    ネイティブでJSONのエンコード・デコードをサポートしているブラウザ。インタプリンタで走るJSでのパースより高速ぽい。
  • 1