Questions tagged [json]
The json tag has no usage guidance.
22
questions
0
votes
1
answer
59
views
Is there a way in python to limit an API result?
I'm making a Web Application about movies and using IMDb's API. Here's the JSON result:
{"items":[{
"id":"tt0111161",
"rank":"1",
"title":&...
0
votes
1
answer
82
views
(Android Track - Pokedex) Why does my PokeAPI request return the current time instead of the pokemon's description?
I'm working on fetching the description of the Pokemon in Pokedex (from the Android Track) and used the JsonObjectRequest to do so. The app fetches the correct description and displays it, but after a ...
0
votes
1
answer
606
views
CS50w / Project 3 - Mail / Inbox showing duplicates
I'm currently on Project 3 in CS50 Web and pretty much completed it. However, there seems to be a bug in unarchiving emails. Whenever I click the unarchive button and it reloads the Inbox, there seems ...
0
votes
0
answers
3k
views
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@app.route('/api/<string:isbn>', methods = ['GET'])
def isbn(isbn):
#import api from Goodreads (stats)
book_data = db.execute("SELECT * FROM books WHERE isbn=:isbn",{'isbn':isbn})....
0
votes
1
answer
406
views
Route did not return true when username is available
my check50 returns the following error:
:( /check route confirms whether username is available
route did not return true when username is available
Log
sending GET request to /check?username=...
0
votes
1
answer
1k
views
Send Variable from Javascript to Flask Application
In a Javascript file scripts.js, how do you send a variable called place which contains information about a place (e.g. name, location, rating) to a Flask Python application.py.
0
votes
0
answers
188
views
pset8 mashup How To Work With The JSON Object?
As the title says, I'm having troubles about how to work with the returned data from the /articles route. My question is about accessing key->value pairs of the JSON Object.
When I manually search ...
0
votes
1
answer
2k
views
pset9: ajax posted json object to flask makes flash messages and rendering templates impossible
I have an app with a form. I put all the info retrieved from the form in an object and then call JSON.stringify on it so that it becomes a json object. Then I post it with an ajax call and my flask ...
0
votes
1
answer
250
views
Can't get articles on my marker, and city markers are persisting
function addMarker(place)
{
// Create marker
var marker = new google.maps.Marker({
position: {lat: place.latitude, lng: place.longitude},
map: map,
title: place["...
1
vote
1
answer
135
views
Pset8: Please help, all my markers and news disappeared (Other peoples code don't work either)
Context:
Update:* Checked other peoples code(https://github.com/endiliey/cs50) on the web and their icons are not showing up either.
I also noticed that the staff implementation now no longer have ...
0
votes
1
answer
60
views
Don't understand why a function accessing an API is not returning a response
I'd appreciate some help with something I'm working on for my final project.
I'm trying to create a web-app based on what we had to do for Pset8 - creating a google map that updates with information ...
0
votes
0
answers
318
views
pset8 mashup troubles
So I am having trouble understanding how json works my Json is not outputting any of of the articles through the infowindow does anyone here know what problems I am causing?
Ill first show my code in ...
0
votes
0
answers
54
views
PSET8: dealing with empty infoWindows
My infoWindows are working fine when there is text to be displayed in them, but I'm struggling with empty infoWindows. The code I tried to use to implement the empty window functionality is below:
$....
0
votes
1
answer
346
views
Pset8: add marker, article links not clickable
I got through most of the portions into showInfo and was able to have the titles display and I am even able to get an underline that looks like a link, however, they are not clickable.
Can someone ...
0
votes
1
answer
414
views
My articles do not match with the staff articles
I implemented articles in application.py, but the articles I get have nothing in common with the staff articles for the same Postal Code 02138
https://ide50-username.cs50.io/articles?geo=02138
http:...
0
votes
1
answer
269
views
pset8 addMarker JSON question
I'm struggling with pset8 quite a bit during the addMarker function. I try to access the JSON object returned from articles() but I can't seem to understand how to access it. I've tried JSON.parse(),...
0
votes
1
answer
203
views
pset8 addMarker() - Problem displaying <ul> in the google maps textbox
I'm having a hard time figuring out why my function doesn't show the unordered list in the marker's info box but instead it does display "[object HTMLUListElement]".
console.log(list) confirms that ...
0
votes
1
answer
126
views
pset8 - /search - I'm not getting any json outputs
In my SQL table I stored the postal_code as INTEGER and place_name as TEXT. So whenever I type a number or text, it will match accordingly. The problem is that I'm not getting anything as JSON output.
...
0
votes
1
answer
200
views
The search.php in pset 8
So I have already implemented the search.php code. I have tried https://ide50-username.cs50.io/search.php?geo=Cambridge,Massachusetts,US on my code and the staff implementation. My code returns a lot ...
2
votes
1
answer
837
views
pset8: infowindow and $.getJSON difficulties
I have been working on this since yesterday, and I am not sure if I am structuring my program correctly. When I call $.getJSON and simply print out the data it fetches, everything works fine, but I ...
0
votes
1
answer
291
views
PSET8 search empty JSON
I wrote a few lines of code just to detect any problems and I unfortunately did. The following code returns an empty JSON array, only two square brackets with no content between them. I tried using ...
0
votes
1
answer
330
views
pset 8 mashup getJSON fails even though I am feeding it valid json
My google url shortener implementation as the "extra feature" has gone on for two weeks. I've struggled with this last little detail. Although I get a kick out of seeing most of the code function, the ...