https://github.com/bahrus/tson
An extension of JSON that supports functions, and references to static objects and functions present in the runtime environment
https://github.com/bahrus/tson
Last synced: 3 months ago
JSON representation
An extension of JSON that supports functions, and references to static objects and functions present in the runtime environment
- Host: GitHub
- URL: https://github.com/bahrus/tson
- Owner: bahrus
- License: mit
- Created: 2015-10-12T17:33:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-20T16:51:53.000Z (about 8 years ago)
- Last Synced: 2024-12-31T23:12:03.524Z (5 months ago)
- Language: TypeScript
- Size: 1.11 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TSON
An extension of JSON that supports functions, and references to static objects and functions present in the runtime environment.
What does TSON stand for?
1. Tasmanian School of Nursing
2. TypeScript Object Notation## What problems does TSON solve?
### Problem 0
Really, the goal of TSON is to enable more robust configuration DSL's than what JSON provides. But that is not very precise. The following problems provide more precision.
### Problem 1
The extra verbiage of double quotes, lack of support for comments, trailing commas make editing JSON tedious and not very maintainable. Lack of compile-time checks makes it quite error prone.### Problem 2
When configuring complex components, like a grid, often JSON-like JavaScript is the preferred syntax. But often those configuration settings should refer to functions or complex objects available elsewhere. For example the markup might be something that needs to be loaded in the context of a UI component.
### Problem 3
The TypeScript Object Notation needs to be something than can be converted to JSON without any loss of information. This way, we can safely embed the JSON inside an html tag, for example, or retrieve the JSON via AJAX, and be guaranteed that the act of loading the JSON will have no unexpected side effects, without any developer approved actions.