https://github.com/icelikespy/Simplified-JSON
All the goodness of JSON but with variables and neater syntaxing
https://github.com/icelikespy/Simplified-JSON
node-module
Last synced: about 1 year ago
JSON representation
All the goodness of JSON but with variables and neater syntaxing
- Host: GitHub
- URL: https://github.com/icelikespy/Simplified-JSON
- Owner: icelikespy
- Created: 2023-04-20T15:53:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-04T22:37:49.000Z (over 2 years ago)
- Last Synced: 2025-03-23T06:51:06.891Z (about 1 year ago)
- Topics: node-module
- Language: JavaScript
- Homepage:
- Size: 82 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simplified JSON
The JSON we all know and love, but variable support built-in
Why?
Simplified JSON orignally started out when I was creating a JSON validator, but I kept getting my sytnax wrong because of mistypes. I
got tired of quotes and colons, I wanted something more simple. I brainstormed if I made a version of JSON how I would want the sytntax, not only to make it
easy to write for me but easy to read for people with no experience, they simply want to edit configs. I added support for variables, booleans are now simple
yes and no values and no quotes are needed as type detection is built-in.
Usage
You can see examples over in the examples folder.
Syntax
- Comments: !! This is a comment
- Variable Definitions (non file): *define VarName as VarValue
- Variable Definitions (TXT file): *define VarName as require('file.txt')
- Variable Definitions (JS file): *define VarName as require('file.js')
- Variable Usage: key = *VarName*
- KV Pairs: key = value
- Objects: See examples (KV pairs in sections MUST be indented)
- Arrays (multiple items): key = [ArrayItem1, ArrayItem2]
- Arrays (single item): key = [ArrayItem1, none]
- Null values: nill
- Booleans: yes, no
Notes
- Variables extracted from JS files must share the same name as the one defined.
- Indentation must be followed.
- The system will see slowdowns should a large variable definition be present.
Planned features
1. Support for nested objects
2. Array of Objects support