acrogenesis / jsonview-safari Goto Github PK
View Code? Open in Web Editor NEWA port of the JSONView Firefox extension that formats and syntax highlights JSON viewed inside of the browser.
Home Page: jsonview.com
License: MIT License
A port of the JSONView Firefox extension that formats and syntax highlights JSON viewed inside of the browser.
Home Page: jsonview.com
License: MIT License
The extension is no longer pretty printing the JSON. For example, when I navigating to the following location, I seeing the JSON as the normal raw text:
http://www.raywenderlich.com/downloads/videos/books.json
If I re-enable/re-install the extension, the extension has works otherwise not working (browser restart e.g.).
After updating Safari to version 13, the JSONView extension was removed as incompatible.
Could you please add support for Safari 13?
Thank you!
It works fine on viewing json format data. But when doing some service that interact with server by json, it do not work and show the warn message
Response is not valid json
When loading a local json file into Safari - the extension does not appear to work.
Steps to reproduce:
Expected Results:
The loaded file should be formatted using JSON View extension
Actual Results:
The loaded file is shown as plain text
There is a JSON code on the page as a part of manual. Somehow that code is picked up as a main content of the page and replaces all other stuff.
Steps to reproduce:
JSONView extension does not display a string with a length of 93179 characters
JSONView-Safari extension does not display a string with a length of 93179 characters, but when a I click the RAW button, the string is there. It does display the string of the first object of the response of a API I've built.
I have not test this very much, nor had made an in-depth research due to I'm overwhelmed from school work. But what I can tell is that, on FireFox JSONView it does display the JSON's object's string property value. Also, I made the API where I've receive the JSON objects and as far I can see, the API works perfectly, meaning that the API is NOT the problem...
Thanks for taking time to review this issue and evaluating it. Keep up the good work! ๐
this seems to fail when dealing with anything other than a minimal amount of data.
Hello Guys,
Does it possible to use this extension in Mac OS 10.14? Looks like they removed possibility to install extension from other source except App Store. And also they still didn't implemented any way to search extension in App Store. Can you please provide direct link on App Store with this extension?
Thanks!
It would be nice to have a button for switching to RAW mode or JSON mode the content of the page.
Thanks
I am seeing the following being inserted on the bottom of some of my pages that have no json in them.
This might have just started with version 1.7
<iframe>
#document
<html>
<head>
<style type="text/css"></style>
</head>
<body>
<a id="raw" href="https://editedURL?&jsonace=30#raw-json" class="btn btn-default">RAW</a>
<meta charset="UTF-8">
<title> editedURL </title>
<link rel="stylesheet" type="text/css" href="safari-extension://com.acrogenesis.jsonview-56Q494QF3L/8b170976/default.css">
<div id="json">
<span class="num">12</span>
</div>
</body>
</html>
</iframe>
View the following as JSON in the browser:
{
"x": "\"/>\u003ch1\u003etext\u003c/h1\u003e"
}
This results in h1 being rendered as HTML by the browser instead of showing the <, > characters.
eg. happens every time I submit a bug on http://bugreport.apple.com
shows an error message if this plugin is enabled.
(probably you have to attach a file to the bugreport)
Pages that have valid content, and additionally have only one pre tag, are falsely parsed by this extension as JSON, you should modify your code to accommodate this.
On this line https://github.com/acrogenesis/jsonview-safari/blob/master/jsonview.safariextension/jsonview.js#L4
Instead of doing:
if(document.getElementsByTagName("pre")[0] && document.getElementsByTagName("pre").length == 1){
Consider doing this:
if(document.querySelectorAll("*").length === 1 && document.getElementsByTagName("pre")[0] && document.getElementsByTagName("pre").length == 1){
I've had an issue that has plagued me for some time. Any time i would get a proper JSON response to a file upload, safari would return server error in ExtJS when attempting to parse the responseText. Come to find out this plugin was doing something that caused this problem. Here is a URL to test this problem out.
http://ext4all.com/post/extjs-4-2-2-html-5-multi-file-upload.html
I'm using Mac OS X 10.11.3 w/ Version 9.0.3 (11601.4.4)
I have your 1.7 plugin installed (i even tested this out with the Ace plugin too)
Try to upload a file to that demo, and w/ the plugin installed and enabled you will get a server failure. If you use safari's inspector, you'll note that valid JSON is being returned. Disable the plugin and retry and it works. This was a very odd problem, and one that has stalked me for some time.
When the RAW / BEAUTIFY button is clicked to see the raw json, the parameters passed in the original url are ignored and the plugin's parameters are added.
Example:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.