Json

I've rewritten JSON deserialization logic in a functional/declarative style, it looks much nicer than before, but maybe you'll spot more potential for improvement.