An open API service indexing awesome lists of open source software.

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

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