@JayTaph tweeted "JSON is NOT a config language. It's for javascripters who cant be bothered writing decent data conversions and models.."
This supports that statement. You know, for fun and profit.
@JayTaph tweeted "JSON is NOT a config language. It's for javascripters who cant be bothered writing decent data conversions and models.."
This supports that statement. You know, for fun and profit.
You can see the result of this gist at on Blocks at http://bl.ocks.org/potherca/6922342
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Is JSON a config language?</title> | |
</head> | |
<body> | |
<h1>Is JSON a config language?</h1> | |
<code> | |
(Javascripter = <span id="Javascripter">"Javascripter goes here"</span>) | |
=== "JSON is <span id="Config-Language"></span> config language" | |
</code> | |
<script> | |
var Javascripter = { | |
"Write" : { | |
"DataConversions" : false | |
, "Models" : false | |
} | |
}; | |
function canBeBothered(Javascripter){ | |
return Javascripter.DataConversions && Javascripter.Models; | |
} | |
document.getElementById('Javascripter').innerHTML = JSON.stringify(Javascripter); | |
document.getElementById('Config-Language').innerHTML = (canBeBothered(Javascripter)?' a ':' NOT a ') ; | |
</script> | |
</body> | |
</html> |