Result as json option.

Requested in #464.

There's no C api for ruby stdlib, so I call `JSON` via `rb_funcall`.

This is very naive implementation. Any hints how to improve this are welcome!

### Ideas
 * merge `asArray` and `asJson` into one option.