Well, it works there since it's doing a mixin on Lua code. You wouldn't be able to take the same function that they're doing and applying it to Json files.
Though it is something interesting I'd have to say, maybe there is a way to somehow manipulate the data gotten from Json files in a similar way. After all, the engine itself manages to do that, so there ought to be a way. But without the ability to take a peek inside the engine (or, at least, very hard to do so), it's hard to say if we even can do that at this point.