Thin, robust, schema-first yet simple data interchange format for Internet. Best well-planned alternative to JSON!
import InternetObject from 'internet-object'
const schema = "name,age"
const o = new InternetObject("Spiderman,25", schema)
// Prints Spiderman
console.log(o.data.name);
// Prints 25
console.log(o.data.age);import InternetObject from 'internet-object'
const schema = "name,age,address:{street,city,state,zip}"
const o = new InternetObject("Spiderman,25,{Bond Street, New York, NY, 50005}", schema)
// Print o
console.log(o.data);Outputs following object.
{
"name": "Spiderman",
"age": 25,
"address": {
"street": "Bond Street",
"city": "New York",
"state": "NY",
"zip": 50005
}
}
- Tokenizer
- Tree Parser
- Schema Parser
- Number
- Strings
- Boolean and Nulls
- DateTime
- Collections (WIP)
- Definitions (WIP)
- Serialization (WIP)
- Optimization (WIP)
- Testing (WIP)
- Fork repository from https://github.com/maniartech/InternetObject-js
- Install dependencies
npm installoryarn install - Make changes in
./src - Update tests in
./tests/ - Run tests,
npm testoryarn test - Send pull request(s)
For more information about Internet Object architecture - InternetObject.org
ISC License: © ManiarTechⓇ 2018-2020
