2.0.2 • Published 7 years ago
react-json-view-extended v2.0.2
react-json-view-extended
This fork extends to excellent react-json-view module to accept data types that are beyond the purview of strict JSON.
Datatypes
Existing
- Boolean
- Date
- Float
- Function (for javascript functions)
- Integer
- NaN
- Null
- Object
- Regexp
- String
- Undefined
New
- Bool
- Complex
- Str
- Float
- Int
- NoneType
- Range
- Code
- Iterator
- ContextManager
- UnknownPyType
- UnhandledType
- ByteArray
- Bytes
- Callable
- Method
- MemoryView
- Type
- Ellipsis
- NotImplemented
- Exception
- Warning
- Module
- PandasSeries
- PandasDataFrame
- Figure
Datetime
List
- PySet
- Tuple
- Dict
- FrozenSet
How to add new type
- Create new component in
./src/js/Components/... - Ensure component is exported in
./src/js/Components/Datatypes.js - Add theming to component in
./src/js/themes/getStyle.js - Import and add as switch to
getValuemethod in./src/js/Components/VariableEditor.js
Others to handle
- Braces on Object.js at
getBraceStartandrender.
To be understood
- How does flux work here?
- What is happening in
Object.getStatewith parentType and type?