JSON builder implemented.
It hasn't been tested though, some parts may be wrong.