V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
ooof

寻简洁读取一个 Json 文件的写法

  •  
  •   ooof · Aug 27, 2015 · 3423 views
    This topic created in 3897 days ago, the information mentioned may be changed or developed.
    Json 文件地址: http://liuyong.mayiduanz.com/www/a.txt

    PS:是自己想学习一下。

    谢谢!
    2 replies    2015-09-04 13:51:41 +08:00
    ThomasChan
        1
    ThomasChan  
       Sep 2, 2015
    为啥保存的后缀是 txt..........
    用 nodejs 最简单把 直接 require 这个 json 就完了。。。
    ooof
        2
    ooof  
    OP
       Sep 4, 2015
    @ThomasChan 那个网站,后缀 Json 的话,就无法读出了。

    想知道用 JavaScript 的话,应该怎么写。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1189 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 115ms · UTC 23:12 · PVG 07:12 · LAX 16:12 · JFK 19:12
    ♥ Do have faith in what you're doing.