Flurl deserialization issues when calling .NET Web API - json

Currently creating a Xamarin Mobile App which uses an ASP.NET Web API, however, I'm having issues de-serializing the data on the app side.
I've tried a multitude of ways none of which I can get to work. Flurl GetStringAsync & GetAsync work as they should, however, these too show the same issue when trying to serialize the data afterward with GetJsonAsync and don't give any issues on where the problem might be.
https://i.stack.imgur.com/ZFbwV.png
I've checked the data with insomnia and know the API is outputting the correct data.
https://i.stack.imgur.com/WgoxP.png
Currently have the code as shown however as noted above this doesn't work.
https://i.stack.imgur.com/bOAhF.png
Any help would be much appreciated

After searching for hours through youtube videos i fixed the issue by changing the data type to a list, with the 'patientdata' object beneath it.
https://i.stack.imgur.com/nfQdy.png

Related

Trouble with connecting with an Api Rest

I am trying to connect with an Api Rest, this is the link: https://movie-database-alternative.p.rapidapi.com/?s=Avengers+Endgame&r=json&page=1 , the problem is that i have never work with JSON and i don't know what to do. This link makes a get to the movies named "Avengers endgame", but I need it to be a specific link to be able to make the connection to the rest api. (This api is public, I'm working with data virtualization).
I tried to make some connections but i dont quite understand the syntaxis of JSON. It is not my field :( Coud somebody help me? Thanks!

WP REST API v2 JSON endpoints appear difficult to read

I found WP REST API very interesting in making custom functionalities in WordPress websites. However, I find it hard to read my JSON endpoints' results.
The normal output of JSON endpoint is wrapped in html and pre tags. T result appears in one long line of compressed string.
I need to integrate my website to a mobile app to be done by another developer and I would like to display the API endpoints (e.g. link) to appear as a regular JSON Object like:
I'm trying to find a workaround like a hook or a filter to make the JSON results appear as I desired. Or equivalent AJAX related code would be nice.
I use a Chrome extension of JSON Formatter to view the results which prints out with readability in mind.
https://github.com/callumlocke/json-formatter

How does JSON work when calling from Postman (or SoapUI)?

I'm using Postman and sending various requests that get responses in XML or JSON. I want to understand how JSON works with the APIs. I know that JSON is a called response and I know how to write a JSON file and read it and understand it, although I've never actually used it.
So, my question is how does JSON show up on the website?
I imagine someone has to code it there, similar to HTML.
When I google, I just basically get how-to instructions on various tools from a procedural standpoint and nothing relevant to my question.

How is following HTTP url string parameter encoded and decoded? &=& vs &&

I was going through some website and stumbled upon following bug in it, while playing with different combinations for url parameters.
When I append ?&=& to any valid url on this website I get following error: /p is part of url (java.lang.ArrayIndexOutOfBoundsException).
Chrome parses the string as below:
But this exception is not raised when I append ?&& instead of ?&=&. Chrome parses both string into same thing.
How is "?&=&" actually parsed and how is it different from "?&&"? As chrome parses them into same thing why does it generate an exception only in former case?
What kind of bug does this website might have?
Can such bug be used to do some kind of attack on this website?
Note:
I do not own this website so I am just curious to know what might have caused this bug.
Issue is seen consistently on both chrome and firefox.
builtwith.com says this website uses ngix server.
Let me know if this is offtopic here. Didnt find any such info.
Edit:
I understand what this exception means. I just want to know if these 2 kind of parameter are parsed differently. What are the possible cause of such a bug.
A java.lang.ArrayOutOfBoundsException caused by the Java backend of the page.
This exception occurs when a java application is trying to access an element in a Java Array that does not exist.
How and why exactly this occurs or how the url parameters are processed is impossible to say without having access to the source code of the backend.
It is not caused by the frontend code or by your browser.

Facebook Event Json Mesage- how can i get it?

I would like to ask if someone know how to grab a facebook event json message. It doesnt matter if it has to happen programatically. I just want to be able to read the message one way or another.
thanks in advance.
P.s. Maybe an awful question but here you go !!!
I once had to code a small chunk of code to parse a json-encapsulated message. However recently I found out there's a handy solution for it if you use Java
Resty is a small, convenient library
to talk to RESTful services from Java.
It’s surprisingly complex to do the
simplest HTTP calls with the standard
Java library. Resty hopes to change
that.
http://beders.github.com/Resty/Resty/Overview.html
Resty r = new Resty();
Object name = r.json("http://ws.geonames.org
/postalCodeLookupJSON?postalcode=66780&country=DE")
.get("postalcodes[0].placeName");
Just import a small jar lib and you'll be surprised. I currently use this class for getting info from url API.