I think I lost a feature or a configuration.
When you open inspector and inspect network requests, I used to see a formatted JSON tree when a Network request is returning a JSON string.
Now I had to add the console custom formatter and copy paste the JSON response in the console... pretty time consumer.
Do you think Chrome lost a feature or am I just dreaming ?
I saw several older chrome' versions with the Json format feature, but as you said, on the newest... some versions of jsons (it might be related with the content type or format) is shown as a plain text.
We've been using dbug.io since they beta released and it helps us deal with several jsons files.
Hope this helps!
Related
when I use chrome.exe with --enable-logging parameter it enables chrome to log console messages into debug file.
Sadly it missing the object details:
Example:
[1208:1164:1028/12048.086:INFO:CONSOLE(1)] "%c[WS Message] something color: #7c7c7c", source:something.js (1)
The (1) Stands for the JSON object inside I want to explore in real time in Python. Anyone have idea how to make chrome to save object as string for example in chrome_debug.log?? (Extension or some console command?)
Or any other solution that would enable to view the object in realtime in python?
(Yes i know you can right click on in actual chrome console by mouse then use "copy object", So yes, technicaly, i can make a macro which would do it in real time, but that woud be completely crazy.
I solved this by making Chome extension in Java, that copy-paste JSON objects from dev console. Little bit workaround, but better working that Selenium.
I'm not familiar with web development but I believe this web page text content
https://almath123.github.io/semstyle_examples/
is made of two JSON files mentioned in it (semstyle_results.json and semstyle_results.json) and the JSON files are completely present in ram (If this is the correct term for referring to it) because when I disconnect the internet I can still browse the page and see the text content.
I want to download semstyle_results.json file. Is that possible? how can I do that?
Technically if you visit a website you're "downloading" the content. Your browser sends a request for information and a server responds by sending you the information. You're viewing that information locally. Dynamic sites poll or make further requests as you browse to keep the data updated and relevant, but it's sent to you.
If you want to easily download any of the content from the website, a simple way is to open up the development tools (CTRL + SHFT + I on windows for Firefox and Chrome), go to a source file and click save as. The network tab shows you requests that were made which includes not just files such as json but also the details of the request.
Here is a screenshot locating one of the json files in a Chrome-based browser (Brave)
The webpages may not always show that they will support json or xml return of data. For example if you inspect this webpage SEC EDGAR database using the method described above, it shows no json link but if you append index.json at the end of the link it will return the same data in json format or xml format, if you so please.
i.e: same website but with json endpoint
So it is always a good idea to see if the website hosts developer information. For example SEC EDGAR provides developer tools that mentions that the directory structure can be accessed via HTML, XML or JSON.
SEC developer information
This is regarding retrieving data from Mr.Robot
When I used the inspect element tool to investigate the traffic I was getting from the site via the network panel, here's a sample of the data I got
Does anyone know where I can find the data that corresponds to the video(tv episode)?
I saw that the file format of xhr represents the XMLHttpRequest so that is a combination of my browser requesting JSON, HTML, and XML from the web server? (Can someone confirm this as well)
I am trying to find a type that corresponds to one of these but having no luck.
I am doing this to enhance my knowledge of web and network engineering.
In the network tab, if you select to see the headers tab, you can see this information:
Request URL:http://api.massrelevance.com/usadigitalapps/mr-robot-tag-mrrobot.json?limit=5&since_id=1039088770827352555_891624285
Here, you can see it's a request to a JSON file. :D
EDIT: Try going to this URL when the video is not playing in the browser (for some reason, when I had the page loaded this was returning as blank):
http://api.massrelevance.com/usadigitalapps/mr-robot-tag-mrrobot.json?limit=5&since_id=1039263408306586885_20082880
That was the request mine was making. In there, you can find a video URL:
https:\/\/scontent.cdninstagram.com\/hphotos-xaf1\/t50.2886-16\/11765169_875397039210031_1586195986_n.mp4
Remove the \ and you'll see the video :D
I would like to open "application/hal+json" response inline in my Chrome browser. The problem is that the Chrome browser doesn't recognize the HAL response and downloads it. Before I always used the JSON view extension for Chrome for checking my JSON response. But since swapping to HAL it immediately downloads my response so I cannot review it anymore.
For Chrome:
I just ran into a nice solution myself. I hope answering here will help some other people who run into the same problem...
Installing this 'application/...+json|+xml as inline' chrome extension solved it nicely. I am now able to review my server response again as normal.
For FireFox:
Install the extension called JSONView. After install go to extensions page (default: ctrl+shift+a) find the JSONView extension and go to options. There you can add "Alternate JSON content types" that should be opened as by the extension. Simply add application/hal+json to the input field and it will work:
REST developer add-ons: Another solution can be to install a REST developer add-on. The advantage is that you can also change the http request verb (POST, GET, PATCH, PUT, DELETE) and custom set your request headers. A great REST plugin for Chrome is POSTMAN and a nice one for FireFox is RESTClient. But there are several other ones available.
This doesn't exactly answer your question, but installing the HAL Browser from your web server will convert HAL to HTML for viewing your application/hal+json responses inline. It's particularly nice because it makes the links navigable and also links to the relation documentation (if the relation name is a URI).
Oddly enough, my Chrome sends an Accept header of /;q=0.8 so it falls back to anything the server sends it. I wonder if you're running a different version of Chrome than I am. I'm on v30.0.1599.101.
Came here looking for a solution for Firefox and application/hal+json content type.
I ended up installing JSONView, which has an option in its preferences menu to add extra content types.
I have a WCF service set up to serve data through multiple endpoints (SOAP, JSON and XML) the SOAP and XML is working perfect, but when I try to view the json I get a prompt to download a file with the json results instead of displaying the results in the browser. This probably won't matter as the client will most likely be consuming the data from some sort of .net environment which will be able to handle the response natively, but I wanted to see if there was a way to display the json results in the browser just like the XML results.
An example of the url I am using to get the results:
http://localhost/api/Service.svc/json/GetResults?name=Test&test=test
This then prompts me to download a file named "GetReults" with no extension and the filetype is: application/json
If your goal is to view the content of the json response in the browser then change your settings in Firefox or else use another browser. I have tried a similar thing with IE and it showed the json content in the browser without making any changes. Not sure what Chrome will do.
I have a similar situation with a rest call that I post a request to. I was making a mock rest service in Grails and noticed that when I hit the live server or my mock server with Firefox it kept asking me to download the file, but not with IE. The problem I'm dealing with now is that I am trying to hit my mock endpoint with SoapUI and it is also asking me to download the file. If I hit the live server with SoapUI it does not ask me to download the file.
Still trying to figure this issue out.
This is exactly the desired behavior. The return response's content type is "application/json". Most browsers cannot display content with this content type inline (unless manually configured), so they prompt you to download the file.
If you actually save this file, and open it with -- say, note Notepad -- you will notice that the pure JSON response is contained in the file.
The inability to handle this content type and the browser forcing this download is almost never an issue, however. The reason is, the general use case for the usage of this JSON endpoint is either the ASP.NET AJAX framework-powered webpages (that automagically make these requests and parse responses by themselves), scripting environments like Python or Perl (which again would just get the requests and then parse them), or custom JavaScript frameworks.
Hope this helps!