Base JSON scheme generation

@roman-mazur just review it and say am I moving in the right direction, please
Make it write directly to a `Writer`. Why do you need a `String`?