Provides simple classes for JSON responses that adhere to a standardized structure.
Questions tagged [jsonresponse]
286 questions
0
votes
0 answers
Django Search Bar Autocomplete is not populating at all
I'm looking to use autocomplete to show the items already populated in the 'ComicInputs' model filed named 'Title'. It will not work after trying a few different options.
I'm using a JsonResponse in this version.
Models.py
class…

johnperc
- 73
- 8
0
votes
0 answers
Django Http response/Json Response?
I need help getting my receipt printer working with post/get commands.
Here is the code in django/python. It runs without any error message, but it's not printing anything
import requests
import json
from email import header
import mimetypes
import…

stelity
- 33
- 8
0
votes
0 answers
sending value form views.py to html using jsonresponse
i want to get a value from my view to html using jsonreponse, the problem is that my code work fine in views.py and i can print the data , but when i call the data in ajax it doesn't work it just give 0 as result ( because i declare round_surf = 0…
0
votes
2 answers
Filtering Json response updating mongodb database
I'm trying to filter a json response and use the filtered response to update several documents in my mongodb collection. The Json response looks like…

vdmua
- 1
- 1
0
votes
2 answers
Unable to capture the array data from multi dimension array
In Angular, I am getting multi dimension array as a response from backend. I want to capture only one array data into my new array with only few values from it (id and fname). I tried multiple ways but things did not work for me. Below are the…

Bhushan Khaladkar
- 420
- 1
- 7
- 20
0
votes
1 answer
How to accept both string and array of objects as input for a same attribute in raml file
I have a attribute address, in Json response I'll get array of address and when address is not available Iam getting "" empty string as response. I declared address as array type in raml file, so Iam getting error when I receive "" Empty String. So,…

Hemanthraj
- 1
- 1
0
votes
0 answers
JSON response with nested calculated key in ROR
I have a model and I need to group some of relations and make json response.
For example i have Models:
users: {
orders
...
}
orders: {
order_group
items
...
}
items: { ... }
order_groups: { ... }
I need to return JSON of users with…

exvayn
- 278
- 1
- 5
0
votes
1 answer
Responding with a custom non simple object from a Django/Python API to the front
I'm a newbie building APIs with django/python
I built a dictionary object (it has lists inside other lists in it), and I want to send it to the front through one of the responses: JsonResponse, HttpResponse, etc.
What could be the way to do it?
I…

Rafael
- 2,413
- 4
- 32
- 54
0
votes
0 answers
Return of a function into onResponse Method volley android studio
I got a function where Im making an arrayrequest with the purpose to get the quantity of the registers from de callback; but, Im trying to return that number for the function.
I´m declaring a variable that gets the lenght or size of the temporal…
0
votes
2 answers
Problems JSON response using dymola (dymola.simulateModel)
I am using:
Dymola 2017 FD01
Python 3.6
integrated Dymola into Python following: https://github.com/RWTH-EBC/AixLib/wiki/How-to:-Dymola-Python-Interface (for Anaconda)
I can't run dymola.simulateModel. If I do I get this error, which is quite…

hillon77
- 1
0
votes
2 answers
Symfony JsonResponse converts snake_case attributes to CamelCase
I am new to symfony, and trying to build a json API.
I am trying to return a Doctrine generated Entity called User as a response to one of the endpoints. However, when passing an instance to the json function :
class UserController extends…

CSNooB
- 39
- 6
0
votes
1 answer
How to reduce Alamofire response callback delay?
After calling .resume() on an Alamofire upload request, the request is successful and in the .uploadProgress closure i see that the data got transferred in ~1-2 seconds. But before the .responseJSON closure gets triggered, several seconds (4-8) go…

Gilby
- 29
- 3
0
votes
0 answers
Stripe not show response data during enter invalid card details in PHP
I add a Stripe SDK for the payment gateway. which works fine when I enter the correct card details. but if I enter the wrong card details like enter the wrong card number it doesn't show me any response. when I try to understand I found that when I…

RAF Algowid
- 87
- 2
- 6
0
votes
2 answers
JSONAPI URL requirements for new resource
According to JSON API V1 specification and its recommendations, I know the URLs for collection of resources should be something like /photos. And the URL for reading, updating, or deleting a single resource that already exists in the database should…

Johnson Liu
- 1
- 1
0
votes
1 answer
Object of type QuerySet is not JSON serializable Django JSON
Everything works until I try to Return JsonResponse
I'm looping through the list, which contains usernames then passing those usernames to the models which return basic user information and storing those values in a variable which I later added to…

greensky
- 19
- 5