Tagged Questions
0
votes
2answers
31 views
Python, some strings encoded after using json.loads - how to decode them?
I'm making a GET request to the Google+ API. I believe that JSON is returned (although I'm not clear about this, see 'response body has following structure' here). I use json.loads to convert the ...
0
votes
4answers
47 views
Submit form in JSON with AJAX
I am trying to submit a form in AJAX in JSON format.
But whenever the form is submitted I get redirect to the form action page.
HTML
<form id="acc" action="#" method="post" ...
0
votes
1answer
11 views
Access value nested beneath unknown Python JSON
I'm trying to access the date value of some JSON in Python, but it is nested beneath an unknown value. How could I access the date without knowing UNKNOWN? Below is a sample of my JSON. Thanks.
...
0
votes
1answer
35 views
Comparing two files of jsons and resulting json difference
I am trying to compare two files, each line is a json and need to compare each line between two files and should return the difference. Since the file size are too big i am not able to read and ...
0
votes
2answers
42 views
python json returns list of…( double linked dicts) ? how to search key get value?
I have a json structure that looks like this:
hrl=
{ "hourly": [
{
"FCT":{
"time":"",
"cvl": "6am"
},
"wind":"brzy",
"tmp":{
"brm":"hot",
"cel":"37"
...
1
vote
1answer
16 views
Custom plugin with Bottle to return datetime as JSON?
I am unfamiliar with the correct Bottle syntax, as such I am left with this error:
TypeError: call() takes exactly 3 arguments (1 given)
Here is my attempt:
from bottle import Bottle, ...
1
vote
4answers
63 views
simplejson returns values not in order [duplicate]
When working with simplejson in Django, I sometimes need to send the information strictly in order.
values = {"entry1":"value1","entry2":"value2","entry3":"value3"}
return ...
0
votes
5answers
72 views
Creating a hierarchy path from JSON
Given the JSON below, what would be the best way to create a hierarchical list of "name" for a given "id"? There could be any number of sections in the hierarchy.
For example, providing id "156" ...
1
vote
1answer
29 views
Django validation of json POST fails unless jQuery.ajaxSettings.traditional = true;
So I have an AJAX post JSON to Django, which is picked up in request.body in my view. Request.body looks like so:
{"c": {"cellid": 5}, "b": {"cellid": 8}, "e": {"cellid": 3}, "i": {"cellid": 9}, "k": ...
1
vote
1answer
23 views
Trouble accessing JSON data in Python for loop
I can read in the JSON data and print data but for some reason it is reading it in as unicode so I cannot use the simple dot notation to get at the data.
test.py:
#!/usr/bin/env python
from ...
0
votes
1answer
41 views
how to save json content from a web query
I have this following code for querying and saving the json response. The query returns me a json output but when I save it with my code then I can no longer retain the json format.
...
0
votes
1answer
29 views
adding line in a file to a list results in None
I need to group lines in a file having same id and create list of such lines. I tried following code which fails
def combiner(file):
exts = dict()
for each_line in open(file):
...
0
votes
1answer
20 views
Parsing Multiple json elements in python
I'm trying to build a small script that will go through the Etsy API and retrieve certain information. The API returns 25 different listing all in json and I would appreciate it if someone could help ...
0
votes
0answers
23 views
JSON, jqGrid and Python (web2py) for beginner
Can someone please give me an examples of json and jqgrid with python.
im newbie, somehow i understand the others.
im trying to get the data from python(controller) using json to
display it on html ...
1
vote
1answer
29 views
Python 3 requests library and json within a list
For example I have this json response:
response = '{"data" : {"next_Data" : { "actual_data" :["data1", "data2", "data3"]}}}'
In my usual approach to a big amount of json, I do this:
import ...