pgrabovets / json-view Goto Github PK
View Code? Open in Web Editor NEWThis is a javascript library for displaying json data into a DOM.
License: MIT License
This is a javascript library for displaying json data into a DOM.
License: MIT License
The fix for #11 implemented in #12 does not work correctly:
jsonview.js:1 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at C (jsonview.js:1:6656)
at I (jsonview.js:1:6905)
at I (jsonview.js:1:6984)
at I (jsonview.js:1:6984)
at I (jsonview.js:1:6984)
at I (jsonview.js:1:6984)
at I (jsonview.js:1:6984)
at Module.S (jsonview.js:1:7118)
at Object.success (data.js:71:24)
Line 153 in 26a04fe
typeof null == 'object'
is true โ meaning Object.keys(null)
is called and immediately throws the above error. null
does not have its own type like undefined
does.
Hello,
Is it possible to expand just the root dictionary or array and have all other sub levels closed?
I'd like to use your tool with some json files containing html code. But I'd like to see the code as code rather than rendered html. Is this currently possible ?
Code uses an array of json data and it works fine if I use .render()
but when trying
const tree = jsonview.renderJSON(data, Sizzle('#resultsDiv')[0]);
I get the error:
Uncaught ReferenceError: createTree is not defined
at Module.k (jsonview.js:1:7164)
and when looking as the JS there seems to be no function named createTree()
Hi,
I used the Jjsonviewer but it does not work in bootstrap modal
so I want to try jsonview.bundle.js
I use to work with CDN . Have you got a link to a CDN for your project ?
thanks you in advance
Hello,
after quick check json-view dos not support display of big numbers right now - the values are changed and wrong data show (problem of javascript runtime itself and JSON.parse()). Do you plan to support big numbers or willing to accept pull request to add support?
Whats not working: { "pi":66110734225681139 }
Will be changed to: { "pi":66110734225681140 }
Currently we are using another library to display formatted json (jquery.json-viewer) but the development of this library seems to has stopped and my pull request to support big numbers is not answered.
Before starting to rewrite our app i'd like to ask if this is a welcome addition or not?
Lets say I have an array of elements, each element has some data I want to search for, an example Order #
If I type 12345 into a filter box it could find the value 12345 in many places and that would be find, but in those items where is was found it would limit the displayed data to only those elements and their children. So if I had 10 orders and array[3] had an order number of 12345, the resultant display would be for the array[3] item.
Maybe even highlight the found match as well?
Hi,
I've found a problem when using json-view with Safari 10.0 on iPad (IOS 10.3)
You can't write directly on style property in createNodeElement() method.
It cause an "Attempted to assign to readonly property" error
I've solved the problem by replacing following line :
lineEl.style = 'margin-left: ' + node.depth * 18 + 'px;';
by
lineEl.setAttribute("style", 'margin-left: ' + node.depth * 18 + 'px;');
It work fine now on Opera.
as seen in the example, in order to get the arrows etc you need
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
It would be good to add this to the readme
Thanks!
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.