JHON Syntax Highlight
JHON === JinHui's Object Notation - A flexible configuration format
Overview
JHON is a JSON-like configuration format with flexible syntax and enhanced readability. This VSCode extension provides syntax highlighting support for JHON files (.jhon).
Features
- ✅ Full syntax highlighting for JHON files
- ✅ Support for single-line (
//) and multi-line (/* */) comments
- ✅ Flexible separators (spaces, tabs, newlines, commas)
- ✅ Support for nested objects and arrays
- ✅ String literals (including multi-line strings with
""")
- ✅ All JSON data types: strings, numbers, booleans, null
- ✅ Escape sequences and Unicode support
JHON Syntax Example
// Application configuration
app_name="ocean-note"
version="1.0.0"
// Feature flags
features=["markdown" "collaboration" "real-time"]
// Database configuration
database={
host="localhost"
port=5432
name="mydb"
credentials=[
{user="admin" role="owner"}
{user="reader" role="readonly"}
]
}
// Numeric settings
max_file_size=1048576 timeout=30.5
debug=true
log_level="info"
Key Features of JHON
- Flexible Separators: Use spaces, tabs, newlines, or commas to separate properties
- Optional Quotes: Keys can be quoted or unquoted
- Comments: Both single-line and multi-line comments supported
- Nested Structures: Support for objects and arrays with unlimited nesting depth
- Multi-line Strings: Use
""" for multi-line string literals
- JSON-compatible: Can be converted to/from JSON
Installation
From VSCode Marketplace
Search for "JHON Language Support" in the VSCode extensions panel.
Manual Installation
- Download the latest
.vsix file from the Releases page
- Open VSCode
- Go to Extensions → Click the "..." menu → Install from VSIX...
- Select the downloaded file
Usage
Create a file with the .jhon extension and start writing JHON configuration. The extension will automatically provide syntax highlighting.
File Association
The extension automatically associates .jhon files with the JHON language.
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
This means:
- ✅ Free to use, modify, and distribute
- ✅ All modifications must also be open source under GPL-3.0
- ❌ Cannot be used in proprietary/closed-source software
- ❌ Cannot be sublicensed with different terms
See the LICENSE file for the full text.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you find any bugs or have feature requests, please open an issue on GitHub Issues.
Author
Jinhui ZHANG - GitHub
Acknowledgments
- VSCode Extension API
- TextMate grammar system