Tagged Questions
0
votes
1answer
51 views
JSON and Python
I am developing a web interface for Arduino, using Python. For automatic updates and display, I use JSON. I have a very interesting problem.
The following code sends the command to a python function, ...
0
votes
1answer
872 views
JSON dumps UnicodeDecodeError
I currently have a program which grabs football data from a website and ports it into a dict:
dict5[name] = ['To: ' + toteam, 'From: ' + fromteam, 'Price: ' + price, 'Date: ' + newdate]
The ...
3
votes
1answer
295 views
Python openweather, json - get weather by city name - how can I say that the city is incorrrect?
I found and modified simple code to get weather condition in Python using openweather and json format. But I have a problem - how can I say that the city is incorrect?
I mean even if I pass a wrong, ...
1
vote
1answer
23 views
Encode Scrapy data to display in Django and Android
I'm having a nightmare with data scrapped with Scrapy. Currently I encode it using UTF-8 i.e detail_content.select('p/text()[1]').extract()[0].encode('utf-8') saved into a JSON file, and then the ...
2
votes
1answer
44 views
Convert Unicode string to UTF-8, and then to JSON
I want to encode a string in UTF-8 and view the corresponding UTF-8 bytes individually. In the Python REPL the following seems to work fine:
>>> unicode('©', 'utf-8').encode('utf-8')
...
0
votes
1answer
11 views
Can Autobahn use a custom json encoder?
When doing RPC with autobahn, autobahn supports procedures returning python objects as long as they are json serializable. Some objects I'd like to return are not by default json serializable. I can ...
0
votes
1answer
33 views
Callback in python script
I've never used python before. Thus, I'm kind of confused. I'm trying to use python script to obtain data from the education api. I'm unsure as to how I would accomplish this. I have the following ...
3
votes
2answers
39 views
Python JSON String (containing hex) to HEX
I'm trying to get random hex value between range of hexes:
random.randint(0xfff000, 0xffffff)
I got the range limits from JSON, as a string.
{"range": "0xfff000,0xffffff"}
How can I convert these ...
-1
votes
2answers
50 views
Convert this python dictionary into JSON format? [duplicate]
I have a python dictionary which I want to convert into json.
Python dictionary:
{"20090209.02s1.1_sequence.txt": [645045714, 3559.6422951221466, 206045184], "20090209.02s1.2_sequence.txt": ...
0
votes
1answer
15 views
Cherrypy json_out module error in Ubuntu
I am trying to get Cherrypy to output json for a project and on my Mac adding the @cherrpy.tools.json_out() decorator is working a treat but on my Ubuntu 13.04 system I get this error.
Traceback ...
2
votes
1answer
52 views
Converting identifier naming between camelCase and underscores during JSON serialization/deserialization
I am working on a python/django application that serves as a web API server to its frontend counterpart. The data exchange between the server and the client is in JSON format with the use of ...
1
vote
4answers
62 views
Python CSV Reader Only First Character of JSON
Amazon AWS Data Pipeline provides a CSV file as output from a MySQL Database. In the CSV, there's a field containing JSON, which we're attempting to extract and decode with Python's built-in CSV and ...
0
votes
0answers
34 views
Three JS - r58 not rendering exported JSON from 3ds Max 2014 or Python script - Deprecated file format line 686
This issue pertains to: Three JS - r58
I'm trying to find a workflow that is successful for creating and rendering JSON files from models in the browser.
So far, I've used the Python tool doing that ...
1
vote
3answers
44 views
How to take a dictionary and send a JSON Response
I have the following function,
def facebooktest(request):
fb_value = ast.literal_eval(request.body)
fb_foodies = Foodie.objects.filter(facebook_id__in = fb_value.values())
for fb_foodie ...
1
vote
3answers
84 views
Parse JSON with colon in key
I am trying to parse the following JSON using Python / Django:
[
{
"street": "KEELER",
":id": 1421
}
]
Within my Django templates, I can successfully access the street key like:
{{ ...