@Cinder
Nope, that is two completely different things. JSON has nothing to do with types at all. It's just a string. PERIOD.
Types and casts are nothing else than handlers. If type is that, than value is expected to be this. And so on and so on.
Example:
200 is a Number. If you just work with that, without any other categorization (INTEGER, LONG, DOUBLE, and so on) you wont be able to do exact calculations PLUS you may bloat your programm in ressources and performance. (BITS, BYTES) Many people have tried that before. NOT WORKING.
Every compiled programm at the end is runned as binary 0 and 1 Numbers.
Coding languages must be strict. So one size fit's all types can't be used. And i guess, that's what you try to do. One type of array, on type of String, one type of numbers and so on and so on.
Of course there is a bunch of languages, where types don't really matter. But i would not call them programming languages, but script languages. Javascript is a example. PHP too, but PHP isn't really a script language nor a programming language. It's just a "maybe parser language as right word????". I mean you may declare an array in both languages like this: myarray=[]: That's no programming language, that's a joke.
C have a loose type handling, still strict, C++ went mercyless strict again (with exeptions). Don't know about Python, but XCode (another form of C++) is completely different. Strict but sloppy at the same time. So, there is allready something there, that matches your idea. But it is based on a strict language. It's just a different method of compiling. Or rephrased: The compiler itself take care to get your syntax back to how it's needed.
So there is only 2 ways for you to achive your goal.
Number one: Write your own compiler (should be based on a known and used language and should return a runable build)
Number two: Don't think that huge and limit your effort to writing libraries for your prefered language, that handles all the types for you.