https://github.com/indoqa/react-json-syntax-highlighter
Serialize javascript objects as highlighted, formatted json
https://github.com/indoqa/react-json-syntax-highlighter
Last synced: about 1 year ago
JSON representation
Serialize javascript objects as highlighted, formatted json
- Host: GitHub
- URL: https://github.com/indoqa/react-json-syntax-highlighter
- Owner: Indoqa
- License: apache-2.0
- Archived: true
- Created: 2016-04-29T15:21:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:23:23.000Z (over 3 years ago)
- Last Synced: 2025-04-17T21:26:03.900Z (about 1 year ago)
- Language: JavaScript
- Size: 2.88 MB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React json syntax highlighter
This is a simple React component that serializes a JavaScript object as highlighted json string.
## Getting Started
Install react component:
```bash
npm install --save react-json-syntax-highlighter
```
Import the component in your file:
```javascript
import ReactJsonSyntaxHighlighter from 'react-json-syntax-highlighter'
```
Use it in your React component:
```javascript
class MyComponent extends React.Component {
render() {
const obj = {
stringProp: 'bar',
numberProp: 1,
booleanProp: true,
nullProp: null,
nestedProp: {
nestedPropBar: 'bar'
}
}
return
}
}
```