Questions tagged [jsonresponse]

Provides simple classes for JSON responses that adhere to a standardized structure.

286 questions
0
votes
2 answers

responseJson - Cannot access when put inside of function

In my javascript file, I've noted where my problems are on lines 19, 30, and 35 of my JS file. I can get responseJson to log to the console in the getUserRepos() function, but if I try to log it to the console inside of the displayResults()…
0
votes
1 answer

Why is my playlist ID undefined when my app tries to save a playlist to my Spotify account?

I am working on the Codecademy Jammming project and I have gotten everything to work correctly except that I am unable to save my playlist to my Spotify account. When I try to run the below code, for some reason I get an error and it tells me the…
Coder1913
  • 3
  • 1
0
votes
1 answer

How to extract boolean value from JSON response?

"name": "items", "accept": "application/json", "start": -1, "count": 1, "items": [ { "filterId": "1cb77df1-b580-4576-a956-0f5ba36340b7", "label": "newTest4", "description": "new Filter…
Charu
  • 11
0
votes
1 answer

I don't understand why 'onResponse()' is not triggered after successful response?

From the log I can see that the web service correctly returns the JSON to me. But for some reason it never enters the onResponse method. MainActivity.java OnResponse() method in getaccesstoken() not triggered after successful response package…
Karan Parwani
  • 21
  • 2
  • 2
0
votes
0 answers

Managing circular dependency in JSON response

How do I handle the dependency between the two entities? I want to be able to get the games for a player and also players for a game. I am currently trying to do it with @JsonIdentityInfo but the result is not satisfying. @Entity @Table(name…
0
votes
1 answer

Karate API json response - How to validate the presence of a key which sometimes come and sometimes not in the API response

I need help in validating the presence of one key in the response. The response of the API looks like - "persons": [ { "id": "27", "source": { "personId": 281, "emailAddress":…
vdrulerz
  • 264
  • 3
  • 13
0
votes
1 answer

How to use the value of a variable that was defined inside the onResponse method in Android Studio

All what I need is to save a pair of list that are in the database to use them later in the code, but the lists always appear empty when are called outside the onResponse method. I'm new in both Android Studio and Databases. I used the Volley…
Ultrinik
  • 1
  • 1
0
votes
1 answer

How do I return data from Pandas DataFrame to be returned by Django's JsonResponse?

The answer to this is probably something really simple, but after hours of searching, I really could not find it. I am trying to return a JsonResponse using Django from a pandas dataframe. One of the many things I've tried is the following: from…
Shooth
  • 83
  • 2
  • 10
0
votes
1 answer

Microsoft Text Analytics API (v2.1) sample code does not work

I want to use the Sentiment analysis API of Microsoft Azure. I use their sample code (https://learn.microsoft.com/en-us/azure/cognitive-services/text-analytics/quickstarts/python) as follows. # -*- coding: utf-8 -* import requests # pprint is used…
Will
  • 3
  • 1
0
votes
1 answer

Display Class Name instead of object in resultant Json Response

I have a generic class Result and a class JsonResponse public class JsonResponse { private boolean success; private Result result; //getter/settter } In my api, i am returning the json response for class ProductDeliveryCounter Constraint…
Aarti Goel
  • 25
  • 3
0
votes
0 answers

Django: request.META.get('HTTP_REFERER') returns None after Ajax call

I am using request.META.get('HTTP_REFERER') to get the referrer page from where current request is made. This function work fine when I am using HttpResponse to render UI. But, if there is an Ajax call which returns JsonResponse to the page, then…
0
votes
1 answer

I've to accumulate JSON responses from different endpoints all into one UI, what's the best way to structure the requests?

I've an endpoint that provides the current weather using /current.json and any future day using future_n.json where n = number of days from today. I do not have the ability to change the endpoints and want a list of these responses, so I can…
Haroon
  • 538
  • 2
  • 11
0
votes
3 answers

Trouble display name property from axios fetched json object

https://codesandbox.io/s/currying-voice-toq9t - I am trying to save the json object into the component state, then render the name into the browser. getProfile() { axios .get( "https://cors-anywhere.herokuapp.com/" + …
BennKingy
  • 1,265
  • 1
  • 18
  • 43
0
votes
1 answer

Returning json response with status code and data in laravel 6

I tried searching for solutions on how to return json response in laravel but after trying few variations i was lost on this matter, an explanations would be nice: why is it that whenever i add a status codes in the json() function like this…
0
votes
1 answer

How to universally flatten different formats of dictionaries into dataframes?

I have a API response object that returns different dictionary formats depending on input to the system. As an example these are two formats: ----------------------1------------------------------ {'0': {'cdate': '2019-09-11 22:29:17', 'email':…
RustyShackleford
  • 3,462
  • 9
  • 40
  • 81