Radical Suggestion: Use Completely JSON in webpages/browsers. better than HTML
We are using Json in many "data presentation" tasks. Why would it not be the case for creating/displaying webpages ?
I make a Radical Suggestion: Use Completely JSON in webpages/browsers.
That is, a website should be presented in JSON (like named array), browser should interpret and show pages from these json data. This would speed up many development and parsing needs.. Many computer/processing/energy power may be saved.
- webservers (including interpreters like php/python) would be faster, bc preparing a webpage would be much faster.
- Browser would be faster. No need to parse, prepare Dom, show all elements on gui... all would be faster
- Crawlers: would be much faster. no need to parse html and construct structured data... All in already in json.. All processing power is saved...
- Apis: All apis would talk directly to webservers or each other.. Api's and webservers would talk to each other directly. This would increase a lot interconnectivity of services.
- Web development/human tasks: Developing/editing/debugging webpages would be much easier with json. almost infinite possibilities with json named attributes. All attributes, styles, classes, would be easily representable in a consistent unique way. No need to memorize/use different notations/format specifiers for each property.. Everything in json named arrays, attributes..
Using this method in representing information/web in Internet, Millions or even Milliars of Dollars would be saved, bc processing power in every Tech device, servers, computers, notebooks, mobile devices etc.
That is, I am suggesting replacing HTML with json.
I will improve this article by giving examples.
Consider website here: https://pydigger.com/pypi/pygps-parser-teltonika-fm1120
You see a "rawdata" section at bottom. With the help of that rawdata/json section, any robots, parsers can directly use data in this "json representation"
That is what I mean, json represented webpage.
Browser, Api clients, devices etc... all can directly get and use such data. No need to parsing, even no need to dom representation. A (properly structured/planned) json data, can have all info.
I will in future try to write a server and client that works in this logic.
A json webserver is actually a Rest Api server. That is already possible/ready.
All I need a basic browser code, that reads from json, instead of HTML.