Khasang Object Notation -- new generation of JSON.
Inspired by Groovy and Python.
50% in less than JSON.
Three times less than the XML.
English: (available soon)
На русском: https://github.com/khasang/KHON/blob/master/KHON-ru.md
Khasang Object Notation -- new generation of JSON
License: Creative Commons Zero v1.0 Universal
Khasang Object Notation -- new generation of JSON.
Inspired by Groovy and Python.
50% in less than JSON.
Three times less than the XML.
English: (available soon)
На русском: https://github.com/khasang/KHON/blob/master/KHON-ru.md
In your examples JSON is incorrect!!!
Part of your example:
{
bookbase:
[
{
title:"Гарри Поттер и философский камень ",
author:"Джоан Ролинг",
cost:500,
quantity:15
},
{
title:"Дракула ",
author:"Брэм Стокер",
cost:430,
quantity:5
},
{
title:"Преступление и наказание",
author:"Федор Достоевский",
cost:400,
quantity:10
}
]
}
{
"bookbase":
[
{
"title":"Гарри Поттер и философский камень ",
"author":"Джоан Ролинг",
"cost":500,
"quantity":15
}
]
}
Давайте сравнивам ваши примеры:
Person
Name Ivan Ivanov
Email [email protected]
Address
Country Russian Federation
City Moscow
Street Ivanovskaya, 11-22
Phone
Mob 915-555-5555
Office 777-55-55
HeLikes
Cars
Apple
Travel
WishList
Name
Manufacturer
Quantity
Notes
Dodge
General Motors
1
MacBook Pro
Apple
2
15 inch
Lamp
No matters
WorksOn
Google
Khasang
CV
Company name
Date to
Date from
Position
Khasang
now
2008-01-01
Architect
Google
2004-11-11
2008-01-01
Manager
Yandex
2000-03-03
2004-11-11
Developer
khon: 694 символа
{
"Name": "Ivan Ivanov",
"Email": "[email protected]",
"Address":
{
"Country": "Russian Federation",
"City": "Moscow",
"Street": "Ivanovskaya, 11-22"
},
"Phone":{
"Mob": "915-555-5555",
"Office": "777-55-55"
},
"HeLikes": [
"Cars",
"Apple",
"Travel"
],
"WishList": [
{
"Name": "Dodge",
"Manufacturer": "General Motors",
"Quantity": 1
},
{
"Name": "MacBook Pro",
"Manufacturer": "Apple",
"Quantity": 2,
"Notes": "15 inch"
},
{
"Name": "Lamp",
"Manufacturer": "No matters"
}
],
"WorksOn": [
"Google",
"Khasang"
],
"CV": [
{
"Company name": "Khasang",
"Date to": "now",
"Date from": "2008-01-01",
"Position": "Architect"
},
{
"Company name": "Google",
"Date to": "2004-11-11",
"Date from": "2008-01-01",
"Position": "Manager"
},
{
"Company name": "Yandex",
"Date to": "2000-03-03",
"Date from": "2004-11-11",
"Position": "Developer"
}
]
}
json: 1133 символа
И осознаем, что в таком виде, JSON не передается по сети. JSON всегда проходит минификацию. В этом вся его мощь, минифицированный он короче XML.
{"Name":"Ivan Ivanov","Email":"[email protected]","Address":{"Country":"Russian Federation","City":"Moscow","Street":"Ivanovskaya, 11-22"},"Phone":{"Mob":"915-555-5555","Office":"777-55-55"},"HeLikes":["Cars","Apple","Travel"],"WishList":[{"Name":"Dodge","Manufacturer":"General Motors","Quantity":1},{"Name":"MacBook Pro","Manufacturer":"Apple","Quantity":2,"Notes":"15inch"},{"Name":"Lamp","Manufacturer":"Nomatters"}],"WorksOn":["Google","Khasang"],"CV":[{"Companyname":"Khasang","Dateto":"now","Datefrom":"2008-01-01","Position":"Architect"},{"Companyname":"Google","Dateto":"2004-11-11","Datefrom":"2008-01-01","Position":"Manager"},{"Companyname":"Yandex","Dateto":"2000-03-03","Datefrom":"2004-11-11","Position":"Developer"}]}
json.min: 726 символа
Мне кажется время, когда стоило трястись за 30 байт прошло.
А теперь попробуйте сжать KHON !
Да и ещё во всех ваших примерах JSON некорректен и не будет парситься.
Если вы надумаете сказать что KHON подходит для конфигурации, я отвечу YAML.
В общем, обдумайте будущее KHON, для чего он вообще нужен, и чем он лучше YAML.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.