Re: How to modify and then recombine json response data without breaking json formatting

2015-03-12 Thread Henry Versemann
I have attached files (please pardon the code file; they may have a lot of comments or commented out code in them) to this response so you can look at the data that I'm seeing as well as the actual code which is using some of the data shown (the file *json_data_list_031115.txt* is gotten in a

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-10 Thread Bill Freeman
OK. but I need more code context. The if statement that does the modification is clearly python, so at that point rspnsdata must be a python dictionary, not a JSON string. Yet, if I understand you correctly, it is JSON to begin with (and you are using json.loads() to turn it into python data so

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-09 Thread Henry Versemann
OK here goes. The logic in the routine which I actually doing the modification to each individual JSON response looks like this: if str(objctTyp) == 'user': rspnsdata['name'] = lstobjct['name'] rspnsdata['id'] = lstobjct['id'] The routine which is doing this

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-09 Thread Henry Versemann
OK here goes. The logic in the routine which is actually doing the modification to each individual JSON response looks like this: if str(objctTyp) == 'user': rspnsdata['name'] = lstobjct['name'] rspnsdata['id'] = lstobjct['id'] The routine which is doing this is

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-09 Thread Bill Freeman
If it's not the basics, then you haven't provided enough information to allow someone to spot the problem. If you post the code that is performing the modification, someone may be able to spot the issue. On Mon, Mar 9, 2015 at 1:50 PM, Henry Versemann wrote: > Yes Id did

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-09 Thread Henry Versemann
Yes Id did do that. The problems I seem to be having only seem to happen whenever I modify the data before sending it. For many other requests that I'm sending and not modifying the data, before I send them back to the client I have no problems and everything is apparently parsed out ok by the

Re: How to modify and then recombine json response data without breaking json formatting

2015-03-09 Thread Bill Freeman
Did you remember to set the content type of your response to application/json? On Mon, Mar 9, 2015 at 1:18 PM, Henry Versemann wrote: > First to be clear up front let me say that I'm using Django1.7, Python > 2.7.8, and the requests (Requests: HTTP for Humans >