Tagged Questions
4
votes
3answers
660 views
StackOverflow user info fetcher
I'm starting to look at Python and it's facilities. I just try to make one simple program using some base libraries.
I would like to hear some comments about anything you've noticed - style, ...
4
votes
3answers
538 views
python: is my program optimal
I wrote code in python that works slow. Because I am new to python, I am not sure that I am doing everything right. My question is what I can do optimally?
About the problem: I have 25 *.json files, ...
4
votes
2answers
69 views
Recursive XML2JSON parser
I made a Python function that takes an XML file as a parameter and returns a JSON.
My goal is to convert some XML get from an old API to convert into Restful API.
This function works, but it is ...
3
votes
1answer
224 views
A better way to convert an SQLObject instance into a dict
I've got this function which returns an SQLObject instance as a dict (taking into account inherited classes, properties, etc). It doesn't work right now on SQLObject classes which inherit from ...
3
votes
1answer
152 views
Substitution of different occurrences of a string with changing patterns
I need to parse an invalid JSON string in which I find many repetitions of the same key, like the following snippet:
[...]
"term" : {"Entry" : "value1", [.. other data ..]},
"term" : {"Entry" : ...
2
votes
1answer
927 views
Converting JSONP to JSON: Is this Regex correct?
I'm fetching a string that is JSONP, and looking to convert it to JSON.
I'm using the following regular expression for matching (for removal) the padding on the JSON.
([a-zA-Z_0-9\.]*\()|(\);?$)
...
1
vote
1answer
150 views
Python JSON method, how to optimise?
I wrote a Python method to convert an object and a subset of its attributes into a JSON string with a given field as the key
There's a lot of string concatenation, and I'm not too sure what the best ...