使用JSON生成网页 [英] Generating web pages with JSON

查看:129
本文介绍了使用JSON生成网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找出使用JSON数据创建webapp的最佳方法。英雄联盟有一个API,可以从他们的请求中返回JSON数据,我想创建一个使用这些数据的站点。我弄清楚的是解决这个问题的最佳方法。我几乎没有任何网页设计经验,但我知道我可以学习。我只是不确定要学什么。

似乎JQuery或AJAX适合使用JSON数据,但API有一个请求限制,所以他们建议缓存数据。很好,我对这个项目感兴趣的很多原因是我对数据感兴趣。所以我跟一位朋友推荐使用PHP。我开始学习PHP,我读的教程说使用MySQL。很酷,到了某个地方。除了显然SQL不支持JSON。



我在想的可能是我不应该担心缓存数据,只是开始使用静态数据请求,没有限制。但我希望这样做的方法可以很好地适应我的项目。

另外,我了解处理JSON格式的基础知识。但是,建立一个设置为填充JSON请求的网站的最佳方法是什么?这似乎是一个单独的问题,而不是实际的请求,但我读到的大部分内容并没有真正解决它。



基本上我变得有点不知所措。我知道这个项目需要学习很多东西,这并不让我担心。但我无法一次性学习网页设计领域的一切。如果有人可以帮我找出方向,那就太棒了。



我也知道html的基础知识但是根本没有用过它。

I'm trying to figure out the best method to create a webapp using JSON data. League of Legends has an API that returns JSON data from their requests and I'd like to create a site that uses this data. What I'm having trouble figuring out is the best way to go about this. I don't have hardly any experience with web design, but I know I can learn. I'm just not sure what to learn.
It seems like JQuery or AJAX are good for using JSON data, but the API has a request limit, so they recommend caching the data. Fine, a lot of the reason I'm interested in this project is my interest in data. So a friend I talked to recommended using PHP. I started learning PHP, and the tutorial I was reading says to use MySQL. Cool, getting somewhere. Except apparently SQL has no support for JSON.

What I was thinking is maybe I should not worry about the caching data yet, just get started using static data requests, that don't have limits. But I want to do so with a method that will scale well for my project.
Also, I understand the basics of processing the JSON format. But what's the best way to build a website that's set up to fill with JSON requests? This seems like it's a separate problem than the actual requesting, but most of what I read doesn't really address it.

Basically I'm becoming a bit overwhelmed. I know that there's a lot to learn for this project, that doesn't worry me. But I can't learn everything in the field of web design all at once. If anyone can help me figure out a direction, that'd be awesome.

Also I do know the basics of html but haven't worked with it much at all.

推荐答案

也许您可以使用JSON到CSV转换器,如 json-csv.com 从API中提取数据然后将CSV导入MySQL,这样就可以获得数据库中的所有数据。
Maybe you could use a JSON to CSV converter like json-csv.com to extract the data from the API then import the CSV up to MySQL so you have all the data in your DB.


这篇关于使用JSON生成网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆