I am building an application that can import JSON data, I want to test about 10k entries, and I don't feel like building a JSON string with that many entries.... so does anyone have a location where I could find some generic populated JSON files? (Music Albums / Movie Listings / Animal Kingdom / Census data / Car Models... I'm not horribly picky, I just need some good data to test with.)
This is a site that is in beta that can give you data in JSON, XML or CSV. All lists are customizable. This is a sample call: http://mysafeinfo.com/api/data?list=englishmonarchs&format=json
Documentation here: http://mysafeinfo.com/content/documentation ; See a full list under Datasets on the main menu
There are few websites that have raw data that can be customized to a JSON format. Here is a link for some raw data information Data
Vienna's Open Data website provide various databases. For example, their Tree register
Edit:
The old link is dead. A great place to find test data is Socrata which aggregates government data. There's plenty of data to test with:
https://dev.socrata.com/data/
If you look through the catalogs, there's usually a JSON export option. Here's an example from the National Service for Age Group and volunteering.
Related
I want to render a UI from a jSON string that has multiple layers.
The user should be able to enter data, which will then be stored and shared, without the overhead of the jSON Render Structure.
However, the assignment of the data must be possible.
The app renders a template from a multidimensional json string that can capture metrics (user inputs). The measured data are entered via text fields by the user.
There are different windows in the app, which are rendered from different json UI-render-files.
The stored algorithms in the windows at the Frontend differ.
The following should be possible:
All windows are created with different jSON strings (works with build_value now).
The user's input is saved. (Currently only works by saving the render json string with the data under a different name (with Package: Shared Preferences)).
The data entered by the user is copied from one window to the other window. (Data Binding / Data Mapping)
The data entered by the user will be sent to a backend.
I only have the idea to use id's in the render json, which allow a mapping.
Are there better solutions?
Saving the entered data is possible by saving the whole jSON - String with an other name.
The goal is to map the data.
It should also be possible for the user to insert another object for the measurement data acquisition at the client / device. The entered data must also be saved.
This sounds like a REST API. Then you would use a frontend framework like angular or react to take user input.
I could build this with a .net core web api with sql db as the backend. this would be a web service (REST API solution) on the backend of your solution.
Next I would integrate Swagger with dependency injection and add authentication.
now its time to create the front end that will use your tested Web Service.
you would have 1 side of your SPA POST new JSON to the Web service in a form.
you would have the other side GET the new record as a new tab with pagination or in a table with pagination.
This would be a good PoC for your idea and will let you learn the parts of the solutions architecture in your language of choice. the "design" would be the same no matter what language your choice.
backend web service can be done in a flask and with a MySQL DB. or with any other combo you have skills with.
the Frontend could be done in knockout.js, making it a little easier to learn than angular or react.
Please create new questions when you choose your software design. I would love to give answers for each:)
I would love to level up with you! ;)
i am a real noob. The thing is, i dont know where to turn. we, as in myself and my thesis partner are trying to build (theoreticly) a platform which has an own search engine directed only at the databases of wikipedia. Now when you download articles or an article, using the wikipedias api you get a json formatted string, now the question is how do i convert that json code string into just text?
like a plain simple english?
and if you have any suggestions on search algorithms for the search engine that would also be helpfull.
(note) if you can give me an explanation otherwise just give directions on keywords to search for
You would typically use a function to convert that json to object and then take the property that is of interest to you.
pseudo code:
function getTextFromwikiArticleJson(json){
var realobject = JSON.decode(json);
return realobject.content.body;
}
JSON is just (one of) the format(s) used to transfer data over internet. It then needs to be processed (i.e. parsed) in order to extract the information you want.
A wikipedia API call might give you much more information than you actually want (so called meta-data), such as creation date, authors, etc.
You are probably interested in the text of the article, so you need to access the corresponding entry in the JSON.
Try pasting the JSON in an online parser, such as https://jsonformatter.org/json-parser.
Also, read about JSON here: https://en.wikipedia.org/wiki/JSON
Most programming languages have functions to parse JSON data (often via external libraries, such as gson for Java, for example)
I am developing a shopping App. I need to parse JSON data to multiple Activities. I already parsed data into single activity by defining URL in MainActivity.
But the problem is, i need to parse data from multiple URLs. I am confused in programming for this process. Please suggest me to define URLs.
Thanks in advance.
OK so I have authenticated fine and understand JSON including how to process it with PHP...
http://php.net/manual/en/function.json-decode.php
But my issues are that the JSON data that the API returns after hitting up FB...me/home end point is very varied. I understand that so is the data on a FB news stream but...
My end game is to show this info in a mash-up with other data but there seems no clear way of formatting it and each item in the JSON response is hugely different with different values. No consistent "item_type" : "photo / status update / message" that I could use to template it up into nicely formatted content blocks on the front end?
Any suggestions on the best way to process / style this type of vary varied JSON?
Thanks.
I would suggest checking out Google's gson library for parsing through JSON documents. Assuming that you are familiar with Java it makes it relatively easy to develop a custom parser that can adapt to documents stored under a flexible schema.
The library page is here. You can find the JsonReader documentation here.
Edit: It also might help to post some example documents so we can get a better idea of what kinds of results you're getting.
I am using yahoo weather api to get weather information
This is returning an xml output.
I want to get it in JSON format. How can i get this as JSON?
I would suggest using YQL and requesting JSON output. The link you referenced is Yahoo's weather RSS feed.
http://query.yahooapis.com/v1/public/yql?q=select%20item%20from%20weather.forecast%20where%20location%3D%2248907%22&format=json
http://weather.yahooapis.com/forecastjson?w=2502265
Just replace forecastrss by forecastjson in the URL.
I see one drawback: No weather-code is returned for the forecast.
Update 2014-06: This used to work, but seems to be gone since 2012-10 (see also https://developer.yahoo.com/forum/YQL/-/1349591762366-e0f8ad94-f599-49fe-bddb-fe3cd0180dea)
As per the documentation at http://weather.yahooapis.com/forecastrss, the rss response is xml.
The Weather RSS feed is an XML
document that conforms to the RSS 2.0
specification. RSS is an XML document
containing a single channel element
representing the feed, several
elements containing metadata about the
feed itself, and one or more item
elements describing individual items
within the feed.
And so, you won't get the response as JSON
if you are looking for a JSON weather API I have a suggestion for you!
I made a Weather API available on mashape, and they have a ready to use simple PHP SDK.
This api is really simple to use because we use the cool standards that are available nowadays, like JSON and REST, while our competitors still use legacy SOAP/XML systems.
Speaking about the quality of data Metwit (my "company") born as a crowdsourced platform for gathering real-time weather reports from real people. After more then ten thousand users started to using our apps and send a massive amount of reports,
we decided to release those precious reports through our APIs.
We also act as single gateway for multiple, hard to parse, sources of forecasts like NOAA, and we're enhancing them with social data like photos, tweets, etc., that we leverage from existing social networks.
If you like it please give it a try on mashape!
After a few search i found the yahoo weather api is best for me as what i really needed.
To get the weather data from latitude and longitude
In XML (default)
http://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (SELECT woeid FROM geo.places WHERE text="({28.3949},{84.1240})")
In JSON format
http://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (SELECT woeid FROM geo.places WHERE text="({28.3949},{84.1240})")&format=json
Your ouput will be like below
Put your own place latitude and longitude to find your location weather, hopefully this will help.